@@ -1771,6 +1771,7 @@ int64_t CWallet::RescanFromTime(int64_t startTime, const WalletRescanReserver& r
1771
1771
CWallet::ScanResult CWallet::ScanForWalletTransactions (const uint256& start_block, const uint256& stop_block, const WalletRescanReserver& reserver, bool fUpdate )
1772
1772
{
1773
1773
int64_t nNow = GetTime ();
1774
+ int64_t start_time = GetTimeMillis ();
1774
1775
1775
1776
assert (reserver.isReserved ());
1776
1777
@@ -1862,6 +1863,8 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
1862
1863
} else if (block_height && chain ().shutdownRequested ()) {
1863
1864
WalletLogPrintf (" Rescan interrupted by shutdown request at block %d. Progress=%f\n " , *block_height, progress_current);
1864
1865
result.status = ScanResult::USER_ABORT;
1866
+ } else {
1867
+ WalletLogPrintf (" Rescan completed in %15dms\n " , GetTimeMillis () - start_time);
1865
1868
}
1866
1869
}
1867
1870
return result;
@@ -4245,15 +4248,13 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
4245
4248
}
4246
4249
}
4247
4250
4248
- nStart = GetTimeMillis ();
4249
4251
{
4250
4252
WalletRescanReserver reserver (walletInstance.get ());
4251
4253
if (!reserver.reserve () || (ScanResult::SUCCESS != walletInstance->ScanForWalletTransactions (locked_chain->getBlockHash (rescan_height), {} /* stop block */ , reserver, true /* update */ ).status )) {
4252
4254
chain.initError (_ (" Failed to rescan the wallet during initialization" ));
4253
4255
return nullptr ;
4254
4256
}
4255
4257
}
4256
- walletInstance->WalletLogPrintf (" Rescan completed in %15dms\n " , GetTimeMillis () - nStart);
4257
4258
walletInstance->ChainStateFlushed (locked_chain->getTipLocator ());
4258
4259
walletInstance->database ->IncrementUpdateCounter ();
4259
4260
0 commit comments