diff options
author | R E Broadley <rebroad+github@gmail.com> | 2014-02-17 16:35:37 -0800 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-11 09:23:23 +0100 |
commit | 456825456810bcc8cc37a65672b68bcb745f5d42 (patch) | |
tree | 75e1d160240aa1369a4f64f6793e6251b12bca4f /src | |
parent | 7dee83aa89615bad35d696e85166d1c7fbe71edf (diff) |
Display progress of rescan.
Rebased-From: 75b8953
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 3ecd994e9d..4f7b96e7f2 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -8,6 +8,7 @@ #include "base58.h" #include "coincontrol.h" #include "net.h" +#include "checkpoints.h" #include <boost/algorithm/string/replace.hpp> #include <openssl/rand.h> @@ -830,6 +831,7 @@ bool CWalletTx::WriteToDisk() int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) { int ret = 0; + int64_t nNow = GetTime(); CBlockIndex* pindex = pindexStart; { @@ -851,6 +853,10 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) ret++; } pindex = chainActive.Next(pindex); + if (GetTime() >= nNow + 60) { + nNow = GetTime(); + LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->nHeight, Checkpoints::GuessVerificationProgress(pindex)); + } } } return ret; |