Make BufferedFile to be a CAutoFile wrapper

This refactor allows to forward some calls to the underlying CAutoFile,
instead of re-implementing the logic in the buffered file.
This commit is contained in:
MarcoFalke
2023-07-04 17:09:13 +02:00
parent fa389d902f
commit 9999b89cd3
9 changed files with 23 additions and 27 deletions

View File

@@ -36,9 +36,9 @@ FUZZ_TARGET(load_external_block_file, .init = initialize_load_external_block_fil
// Corresponds to the -reindex case (track orphan blocks across files).
FlatFilePos flat_file_pos;
std::multimap<uint256, FlatFilePos> blocks_with_unknown_parent;
g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file.Get(), &flat_file_pos, &blocks_with_unknown_parent);
g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file, &flat_file_pos, &blocks_with_unknown_parent);
} else {
// Corresponds to the -loadblock= case (orphan blocks aren't tracked across files).
g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file.Get());
g_setup->m_node.chainman->LoadExternalBlockFile(fuzzed_block_file);
}
}