mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 08:50:26 +02:00
Ignore banlist.dat
This also allows to remove the "dirty" argument, which can now be deduced from the return value of Read().
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user