From 456825456810bcc8cc37a65672b68bcb745f5d42 Mon Sep 17 00:00:00 2001 From: R E Broadley Date: Mon, 17 Feb 2014 16:35:37 -0800 Subject: [PATCH] Display progress of rescan. Rebased-From: 75b8953 --- doc/release-notes.md | 1 + src/wallet.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index d29817c8e2e..170431d0bca 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -342,6 +342,7 @@ Thanks to everyone who contributed to this release: - Philip Kaufmann - Pieter Wuille - Rav3nPL +- R E Broadley - regergregregerrge - Robert Backhaus - Roman Mindalev diff --git a/src/wallet.cpp b/src/wallet.cpp index 3ecd994e9dd..4f7b96e7f22 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 #include @@ -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;