Merge 8209e86eeb into merged_master (Bitcoin PR bitcoin/bitcoin#28458)

This commit is contained in:
Byron Hambly 2025-07-21 13:59:59 +02:00
commit 40637b227e
10 changed files with 42 additions and 41 deletions

View file

@ -5063,8 +5063,8 @@ void ChainstateManager::LoadExternalBlockFile(
int nLoaded = 0;
try {
// This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SERIALIZED_SIZE, MAX_BLOCK_SERIALIZED_SIZE+8, SER_DISK, CLIENT_VERSION);
// This takes over fileIn and calls fclose() on it in the BufferedFile destructor
BufferedFile blkdat{fileIn, 2 * MAX_BLOCK_SERIALIZED_SIZE, MAX_BLOCK_SERIALIZED_SIZE + 8, CLIENT_VERSION};
// nRewind indicates where to resume scanning in case something goes wrong,
// such as a block fails to deserialize.
uint64_t nRewind = blkdat.GetPos();