Skip to content

Commit 9ffd8b3

Browse files
committed
Make fuzz targets deterministic
Disable the std feature for the lightning dependency in fuzz builds. The no-std code paths already use highest_seen_timestamp instead of SystemTime::now() for time, and use zeroed SipHash keys for deterministic hash table ordering. This makes fuzz test cases reproduce consistently without any cfg(fuzzing) changes to the lightning crate. AI tools were used in preparing this commit.
1 parent 450c03a commit 9ffd8b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fuzz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ libfuzzer_fuzz = ["libfuzzer-sys"]
1818
stdin_fuzz = []
1919

2020
[dependencies]
21-
lightning = { path = "../lightning", features = ["regex", "_test_utils"] }
21+
lightning = { path = "../lightning", default-features = false, features = ["regex", "_test_utils"] }
2222
lightning-invoice = { path = "../lightning-invoice" }
2323
lightning-liquidity = { path = "../lightning-liquidity" }
2424
lightning-rapid-gossip-sync = { path = "../lightning-rapid-gossip-sync" }

0 commit comments

Comments
 (0)