Skip to content

Commit eafe9cd

Browse files
committed
[Trivial] Use error() instead of LogPrintf + return false.
1 parent 669794a commit eafe9cd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/init.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,8 +1747,7 @@ bool AppInit2()
17471747
LogPrintf("Rescanning last %i blocks (from block %i)...\n", chainActive.Height() - pindexRescan->nHeight, pindexRescan->nHeight);
17481748
const int64_t nWalletRescanTime = GetTimeMillis();
17491749
if (pwalletMain->ScanForWalletTransactions(pindexRescan, true, true) == -1) {
1750-
LogPrintf("Shutdown requested over the txs scan. Exiting.\n");
1751-
return false;
1750+
return error("Shutdown requested over the txs scan. Exiting.");
17521751
}
17531752
LogPrintf("Rescan completed in %15dms\n", GetTimeMillis() - nWalletRescanTime);
17541753
pwalletMain->SetBestChain(chainActive.GetLocator());

src/wallet/wallet.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,10 +1291,8 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate, b
12911291
if (pindex->nHeight % 100 == 0 && dProgressTip - dProgressStart > 0.0)
12921292
ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((Checkpoints::GuessVerificationProgress(pindex, false) - dProgressStart) / (dProgressTip - dProgressStart) * 100))));
12931293

1294-
if (fromStartup) {
1295-
if (ShutdownRequested()) {
1296-
return -1;
1297-
}
1294+
if (fromStartup && ShutdownRequested()) {
1295+
return -1;
12981296
}
12991297

13001298
CBlock block;

0 commit comments

Comments
 (0)