@@ -4637,7 +4637,7 @@ bool LoadGenesisBlock(const CChainParams& chainparams)
46374637 return ::ChainstateActive ().LoadGenesisBlock (chainparams);
46384638}
46394639
4640- bool LoadExternalBlockFile (const CChainParams& chainparams, FILE* fileIn, FlatFilePos * dbp)
4640+ void LoadExternalBlockFile (const CChainParams& chainparams, FILE* fileIn, FlatFilePos* dbp)
46414641{
46424642 // Map of disk positions for blocks with unknown parent (only used for reindex)
46434643 static std::multimap<uint256, FlatFilePos> mapBlocksUnknownParent;
@@ -4649,7 +4649,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
46494649 CBufferedFile blkdat (fileIn, 2 *MAX_BLOCK_SERIALIZED_SIZE, MAX_BLOCK_SERIALIZED_SIZE+8 , SER_DISK, CLIENT_VERSION);
46504650 uint64_t nRewind = blkdat.GetPos ();
46514651 while (!blkdat.eof ()) {
4652- boost::this_thread::interruption_point () ;
4652+ if ( ShutdownRequested ()) return ;
46534653
46544654 blkdat.SetPos (nRewind);
46554655 nRewind++; // start one byte further next time, in case of failure
@@ -4754,9 +4754,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
47544754 } catch (const std::runtime_error& e) {
47554755 AbortNode (std::string (" System error: " ) + e.what ());
47564756 }
4757- if (nLoaded > 0 )
4758- LogPrintf (" Loaded %i blocks from external file in %dms\n " , nLoaded, GetTimeMillis () - nStart);
4759- return nLoaded > 0 ;
4757+ LogPrintf (" Loaded %i blocks from external file in %dms\n " , nLoaded, GetTimeMillis () - nStart);
47604758}
47614759
47624760void CChainState::CheckBlockIndex (const Consensus::Params& consensusParams)
0 commit comments