wallet: log on rescan completion
This commit is contained in:
parent
3356799ee3
commit
6ad372a973
1 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue