diff options
author | glozow <gloriajzhao@gmail.com> | 2024-10-30 21:16:23 -0400 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2024-10-30 21:16:23 -0400 |
commit | 8351562bec6081eda2a600bfe4edeb264a9dee0b (patch) | |
tree | e9f411bf85d7618198966bccd2d642846f8b02c0 /src/test | |
parent | 917ab810d9380aa0c649847a647078b2f02d2643 (diff) |
[fuzz] allow negative time jumps in txdownloadman_impl
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/txdownloadman.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/fuzz/txdownloadman.cpp b/src/test/fuzz/txdownloadman.cpp index eb903bb470..90e04d8376 100644 --- a/src/test/fuzz/txdownloadman.cpp +++ b/src/test/fuzz/txdownloadman.cpp @@ -430,8 +430,9 @@ FUZZ_TARGET(txdownloadman_impl, .init = initialize) } ); - // Jump ahead in time - time += fuzzed_data_provider.PickValueInArray(TIME_SKIPS); + auto time_skip = fuzzed_data_provider.PickValueInArray(TIME_SKIPS); + if (fuzzed_data_provider.ConsumeBool()) time_skip *= -1; + time += time_skip; CheckInvariants(txdownload_impl, max_orphan_count); } // Disconnect everybody, check that all data structures are empty. |