diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-07-28 20:00:23 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-07-30 11:21:51 +0200 |
commit | fa384fdd0b7af73d81fa9619c5fba779452cd2af (patch) | |
tree | 916e3054782a7188df547399f4efe191dca415d1 /src/test | |
parent | 4b1fb50def0dea0cd320bc43c12d9a12edde0390 (diff) |
Ignore banlist.dat
This also allows to remove the "dirty" argument, which can now be
deduced from the return value of Read().
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/banman.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/fuzz/banman.cpp b/src/test/fuzz/banman.cpp index 1986b5e4c8..de211f601f 100644 --- a/src/test/fuzz/banman.cpp +++ b/src/test/fuzz/banman.cpp @@ -52,8 +52,7 @@ FUZZ_TARGET_INIT(banman, initialize_banman) const bool start_with_corrupted_banlist{fuzzed_data_provider.ConsumeBool()}; bool force_read_and_write_to_err{false}; if (start_with_corrupted_banlist) { - const std::string sfx{fuzzed_data_provider.ConsumeBool() ? ".dat" : ".json"}; - assert(WriteBinaryFile(banlist_file.string() + sfx, + assert(WriteBinaryFile(banlist_file.string() + ".json", fuzzed_data_provider.ConsumeRandomLengthString())); } else { force_read_and_write_to_err = fuzzed_data_provider.ConsumeBool(); @@ -114,6 +113,5 @@ FUZZ_TARGET_INIT(banman, initialize_banman) (void)(banmap == banmap_read); } } - fs::remove(banlist_file.string() + ".dat"); fs::remove(banlist_file.string() + ".json"); } |