diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1827,7 +1827,7 @@ dProgressTip = GuessVerificationProgress(chainParams.TxData(), tip); } double gvp = dProgressStart; - while (pindex && !fAbortRescan) { + while (pindex && !fAbortRescan && !ShutdownRequested()) { if (pindex->nHeight % 100 == 0 && dProgressTip - dProgressStart > 0.0) { ShowProgress( @@ -1880,6 +1880,10 @@ if (pindex && fAbortRescan) { LogPrintf("Rescan aborted at block %d. Progress=%f\n", pindex->nHeight, gvp); + } else if (pindex && ShutdownRequested()) { + LogPrintf("Rescan interrupted by shutdown request at block %d. " + "Progress=%f\n", + pindex->nHeight, gvp); } // Hide progress dialog in GUI.