Skip to content

Commit

Permalink
[fuzz] allow negative time jumps in txdownloadman_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
glozow committed Oct 31, 2024
1 parent 917ab81 commit 8351562
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/fuzz/txdownloadman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8351562

Please sign in to comment.