Browse Source

Stop building witnesses if shutdown requested, fixes #330

witness_cache
Duke 7 months ago
parent
commit
ae0ff73548
  1. 3
      src/wallet/wallet.cpp

3
src/wallet/wallet.cpp

@ -1146,6 +1146,9 @@ void CWallet::BuildWitnessCache(const CBlockIndex* pindex, bool witnessOnly)
LogPrintf("%s: height=%d, startHeight=%d\n", __func__, height, startHeight);
while (pblockindex) {
if (ShutdownRequested()) {
break;
}
if (pblockindex->GetHeight() % 100 == 0 && pblockindex->GetHeight() < height - 5) {
LogPrintf("Building Witnesses for block %i %.4f complete, %d remaining\n", pblockindex->GetHeight(), pblockindex->GetHeight() / double(height), height - pblockindex->GetHeight() );

Loading…
Cancel
Save