File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,14 @@ for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
3535 cargo test --verbose --color always --no-default-features --features no-std
3636 # check if there is a conflict between no-std and the default std feature
3737 cargo test --verbose --color always --features no-std
38- # check that things still pass without grind_signatures
39- # note that outbound_commitment_test only runs in this mode, because of hardcoded signature values
40- cargo test --verbose --color always --no-default-features --features std
4138 # check if there is a conflict between no-std and the c_bindings cfg
4239 RUSTFLAGS=" --cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
4340 popd
4441done
42+ # Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
43+ pushd lightning
44+ cargo test --verbose --color always --no-default-features --features=std,_test_vectors
45+ popd
4546# This one only works for lightning-invoice
4647pushd lightning-invoice
4748# check that compile with no-std and serde works in lightning-invoice
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ max_level_trace = []
2929# This is unsafe to use in production because it may result in the counterparty publishing taking our funds.
3030unsafe_revoked_tx_signing = []
3131_bench_unstable = []
32+ # Override signing to not include randomness when generating signatures for test vectors.
33+ _test_vectors = []
3234
3335no-std = [" hashbrown" , " bitcoin/no-std" , " core2/alloc" ]
3436std = [" bitcoin/std" ]
Original file line number Diff line number Diff line change @@ -7516,7 +7516,7 @@ mod tests {
75167516 }
75177517 }
75187518
7519- #[ cfg( not ( feature = "grind_signatures" ) ) ]
7519+ #[ cfg( feature = "_test_vectors" ) ]
75207520 #[ test]
75217521 fn outbound_commitment_test ( ) {
75227522 use bitcoin:: util:: sighash;
Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ pub fn sign_with_aux_rand<C: Signing, ES: Deref>(
6262 break sig;
6363 }
6464 } ;
65- #[ cfg( not( feature = "grind_signatures" ) ) ]
65+ #[ cfg( all ( not( feature = "grind_signatures" ) , not ( feature = "_test_vectors" ) ) ) ]
6666 let sig = ctx. sign_ecdsa_with_noncedata ( msg, sk, & entropy_source. get_secure_random_bytes ( ) ) ;
67+ #[ cfg( all( not( feature = "grind_signatures" ) , feature = "_test_vectors" ) ) ]
68+ let sig = sign ( ctx, msg, sk) ;
6769 sig
6870}
You can’t perform that action at this time.
0 commit comments