Stop building witnesses if abortrescan is called #331
This commit is contained in:
@@ -1147,8 +1147,14 @@ void CWallet::BuildWitnessCache(const CBlockIndex* pindex, bool witnessOnly)
|
||||
|
||||
while (pblockindex) {
|
||||
if (ShutdownRequested()) {
|
||||
LogPrintf("%s: shutdown requested, aborting building witnesses\n", __func__);
|
||||
break;
|
||||
}
|
||||
if(pwalletMain->fAbortRescan) {
|
||||
LogPrintf("%s: rescan aborted at block %d, stopping witness building\n", pwalletMain->rescanHeight);
|
||||
pwalletMain->fRescanning = false;
|
||||
return;
|
||||
}
|
||||
|
||||
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() );
|
||||
|
||||
Reference in New Issue
Block a user