5#include <chainparams.h>
13#include <validation.h>
24 static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
25 g_setup = testing_setup.get();
33 AutoFile fuzzed_block_file{fuzzed_file_provider.open()};
34 if (fuzzed_block_file.IsNull()) {
37 if (fuzzed_data_provider.ConsumeBool()) {
40 std::multimap<uint256, FlatFilePos> blocks_with_unknown_parent;
41 g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file, &flat_file_pos, &blocks_with_unknown_parent);
44 g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file);
Non-refcounted RAII wrapper for FILE*.
void initialize_load_external_block_file()
FUZZ_TARGET(load_external_block_file,.init=initialize_load_external_block_file)
Testing setup that configures a complete environment.
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.