@@ -4637,7 +4637,7 @@ bool LoadGenesisBlock(const CChainParams& chainparams)
4637
4637
return ::ChainstateActive ().LoadGenesisBlock (chainparams);
4638
4638
}
4639
4639
4640
- bool LoadExternalBlockFile (const CChainParams& chainparams, FILE* fileIn, FlatFilePos * dbp)
4640
+ void LoadExternalBlockFile (const CChainParams& chainparams, FILE* fileIn, FlatFilePos* dbp)
4641
4641
{
4642
4642
// Map of disk positions for blocks with unknown parent (only used for reindex)
4643
4643
static std::multimap<uint256, FlatFilePos> mapBlocksUnknownParent;
@@ -4649,7 +4649,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
4649
4649
CBufferedFile blkdat (fileIn, 2 *MAX_BLOCK_SERIALIZED_SIZE, MAX_BLOCK_SERIALIZED_SIZE+8 , SER_DISK, CLIENT_VERSION);
4650
4650
uint64_t nRewind = blkdat.GetPos ();
4651
4651
while (!blkdat.eof ()) {
4652
- boost::this_thread::interruption_point () ;
4652
+ if ( ShutdownRequested ()) return ;
4653
4653
4654
4654
blkdat.SetPos (nRewind);
4655
4655
nRewind++; // start one byte further next time, in case of failure
@@ -4754,9 +4754,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
4754
4754
} catch (const std::runtime_error& e) {
4755
4755
AbortNode (std::string (" System error: " ) + e.what ());
4756
4756
}
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);
4760
4758
}
4761
4759
4762
4760
void CChainState::CheckBlockIndex (const Consensus::Params& consensusParams)
0 commit comments