Skip to content

Commit 75b8953

Browse files
committed
Display progress of rescan.
1 parent b8d9058 commit 75b8953

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wallet.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "base58.h"
99
#include "coincontrol.h"
1010
#include "net.h"
11+
#include "checkpoints.h"
1112

1213
#include <inttypes.h>
1314

@@ -890,6 +891,7 @@ bool CWalletTx::WriteToDisk()
890891
int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
891892
{
892893
int ret = 0;
894+
int64_t nNow = GetTime();
893895

894896
CBlockIndex* pindex = pindexStart;
895897
{
@@ -911,6 +913,10 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
911913
ret++;
912914
}
913915
pindex = chainActive.Next(pindex);
916+
if (GetTime() >= nNow + 60) {
917+
nNow = GetTime();
918+
LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->nHeight, Checkpoints::GuessVerificationProgress(pindex));
919+
}
914920
}
915921
}
916922
return ret;

0 commit comments

Comments
 (0)