File tree 4 files changed +10
-5
lines changed
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
35
35
cargo test --verbose --color always --no-default-features --features no-std
36
36
# check if there is a conflict between no-std and the default std feature
37
37
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
41
38
# check if there is a conflict between no-std and the c_bindings cfg
42
39
RUSTFLAGS=" --cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
43
40
popd
44
41
done
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
45
46
# This one only works for lightning-invoice
46
47
pushd lightning-invoice
47
48
# 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 = []
29
29
# This is unsafe to use in production because it may result in the counterparty publishing taking our funds.
30
30
unsafe_revoked_tx_signing = []
31
31
_bench_unstable = []
32
+ # Override signing to not include randomness when generating signatures for test vectors.
33
+ _test_vectors = []
32
34
33
35
no-std = [" hashbrown" , " bitcoin/no-std" , " core2/alloc" ]
34
36
std = [" bitcoin/std" ]
Original file line number Diff line number Diff line change @@ -7516,7 +7516,7 @@ mod tests {
7516
7516
}
7517
7517
}
7518
7518
7519
- #[ cfg( not ( feature = "grind_signatures" ) ) ]
7519
+ #[ cfg( feature = "_test_vectors" ) ]
7520
7520
#[ test]
7521
7521
fn outbound_commitment_test ( ) {
7522
7522
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>(
62
62
break sig;
63
63
}
64
64
} ;
65
- #[ cfg( not( feature = "grind_signatures" ) ) ]
65
+ #[ cfg( all ( not( feature = "grind_signatures" ) , not ( feature = "_test_vectors" ) ) ) ]
66
66
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) ;
67
69
sig
68
70
}
You can’t perform that action at this time.
0 commit comments