Display progress of rescan.

Rebased-From: 75b8953
This commit is contained in:
R E Broadley 2014-02-17 16:35:37 -08:00 committed by Wladimir J. van der Laan
parent 7dee83aa89
commit 4568254568
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -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;