mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge bitcoin/bitcoin#28483: refactor: Return CAutoFile from BlockManager::Open*File()
fa56c421beReturn CAutoFile from BlockManager::Open*File() (MarcoFalke)9999b89cd3Make BufferedFile to be a CAutoFile wrapper (MarcoFalke)fa389d902frefactor: Drop unused fclose() from BufferedFile (MarcoFalke) Pull request description: This is required for https://github.com/bitcoin/bitcoin/pull/28052, but makes sense on its own, because offloading logic to `CAutoFile` instead of re-implementing it allows to delete code and complexity. ACKs for top commit: TheCharlatan: Re-ACKfa56c421bewillcl-ark: tACKfa56c421beTree-SHA512: fe4638f3a6bd3f9d968cfb9ae3259c9d6cd278fe2912cbc90289851311c8c781099db4c160e775960975c4739098d9af801a8d2d12603f371f8edfe134d8f85a
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user