Commit bb4d148
committed
Make fuzz targets deterministic
Use deterministic time and hash table ordering when building with
cfg(fuzzing) to ensure fuzz test cases reproduce consistently.
In channelmanager, use highest_seen_timestamp instead of
SystemTime::now() under cfg(fuzzing) for duration_since_epoch and
stale payment removal.
In hash_tables, extend the existing test deterministic hasher to
also apply under cfg(fuzzing), always using zeroed SipHash keys.
AI tools were used in preparing this commit.1 parent 450c03a commit bb4d148
2 files changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8936 | 8936 | | |
8937 | 8937 | | |
8938 | 8938 | | |
8939 | | - | |
| 8939 | + | |
8940 | 8940 | | |
8941 | 8941 | | |
8942 | 8942 | | |
8943 | | - | |
| 8943 | + | |
8944 | 8944 | | |
8945 | 8945 | | |
8946 | 8946 | | |
| |||
14129 | 14129 | | |
14130 | 14130 | | |
14131 | 14131 | | |
14132 | | - | |
| 14132 | + | |
14133 | 14133 | | |
14134 | 14134 | | |
14135 | 14135 | | |
| |||
14139 | 14139 | | |
14140 | 14140 | | |
14141 | 14141 | | |
14142 | | - | |
| 14142 | + | |
14143 | 14143 | | |
14144 | 14144 | | |
14145 | 14145 | | |
| |||
14998 | 14998 | | |
14999 | 14999 | | |
15000 | 15000 | | |
15001 | | - | |
| 15001 | + | |
15002 | 15002 | | |
15003 | 15003 | | |
15004 | 15004 | | |
| 15005 | + | |
| 15006 | + | |
15005 | 15007 | | |
15006 | 15008 | | |
15007 | 15009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments