diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-11-19 21:25:14 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-12-01 13:18:34 +0000 |
commit | 8c09c0c1d18885ef94f79b3f2d073f43269bc95d (patch) | |
tree | 3279e20f8757142551941c4c271f50e8df3211df /src/test/fuzz/rbf.cpp | |
parent | dfd0b700886cab7cd2fcf4958a214b098fe18152 (diff) | |
download | bitcoin-8c09c0c1d18885ef94f79b3f2d073f43269bc95d.tar.xz |
fuzz: Avoid time-based "non-determinism" in fuzzing harnesses by using mocked GetTime()
Diffstat (limited to 'src/test/fuzz/rbf.cpp')
-rw-r--r-- | src/test/fuzz/rbf.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/fuzz/rbf.cpp b/src/test/fuzz/rbf.cpp index 1fd88a5f7b..58167c394c 100644 --- a/src/test/fuzz/rbf.cpp +++ b/src/test/fuzz/rbf.cpp @@ -18,6 +18,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); + SetMockTime(ConsumeTime(fuzzed_data_provider)); std::optional<CMutableTransaction> mtx = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider); if (!mtx) { return; |