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

@@ -607,7 +607,6 @@ public:
bool ResizeCoinsCaches(size_t coinstip_size, size_t coinsdb_size)
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
/**
* Update the on-disk chain state.
* The caches and indexes are flushed depending on the mode we're called with
@@ -1087,14 +1086,14 @@ public:
* -loadblock= option. There's no unknown-parent tracking, so the last two arguments are omitted.
*
*
* @param[in] fileIn FILE handle to file containing blocks to read
* @param[in] file_in File containing blocks to read
* @param[in] dbp (optional) Disk block position (only for reindex)
* @param[in,out] blocks_with_unknown_parent (optional) Map of disk positions for blocks with
* unknown parent, key is parent block hash
* (only used for reindex)
* */
void LoadExternalBlockFile(
FILE* fileIn,
CAutoFile& file_in,
FlatFilePos* dbp = nullptr,
std::multimap<uint256, FlatFilePos>* blocks_with_unknown_parent = nullptr);