aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrewtoth <andrewstoth@gmail.com>2019-04-27 10:15:56 -0400
committerandrewtoth <andrewstoth@gmail.com>2019-04-27 10:15:56 -0400
commit6ad372a973cfa3bd0988b2e40dff0a004db1cf8d (patch)
treef034836a14b55bde8ba4cd58a65514328d9b364e
parent3356799ee3f5441b8d6e68b9172eb641011354f8 (diff)
wallet: log on rescan completion
-rw-r--r--src/wallet/wallet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 8bbb47c093..34014f6204 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1771,6 +1771,7 @@ int64_t CWallet::RescanFromTime(int64_t startTime, const WalletRescanReserver& r
CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_block, const uint256& stop_block, const WalletRescanReserver& reserver, bool fUpdate)
{
int64_t nNow = GetTime();
+ int64_t start_time = GetTimeMillis();
assert(reserver.isReserved());
@@ -1862,6 +1863,8 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
} else if (block_height && chain().shutdownRequested()) {
WalletLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", *block_height, progress_current);
result.status = ScanResult::USER_ABORT;
+ } else {
+ WalletLogPrintf("Rescan completed in %15dms\n", GetTimeMillis() - start_time);
}
}
return result;
@@ -4245,7 +4248,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
}
}
- nStart = GetTimeMillis();
{
WalletRescanReserver reserver(walletInstance.get());
if (!reserver.reserve() || (ScanResult::SUCCESS != walletInstance->ScanForWalletTransactions(locked_chain->getBlockHash(rescan_height), {} /* stop block */, reserver, true /* update */).status)) {
@@ -4253,7 +4255,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
return nullptr;
}
}
- walletInstance->WalletLogPrintf("Rescan completed in %15dms\n", GetTimeMillis() - nStart);
walletInstance->ChainStateFlushed(locked_chain->getTipLocator());
walletInstance->database->IncrementUpdateCounter();