Display progress of rescan.
This commit is contained in:
parent
b8d9058a4d
commit
75b8953a2c
1 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "coincontrol.h"
|
#include "coincontrol.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
|
#include "checkpoints.h"
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
@ -890,6 +891,7 @@ bool CWalletTx::WriteToDisk()
|
||||||
int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
|
int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int64_t nNow = GetTime();
|
||||||
|
|
||||||
CBlockIndex* pindex = pindexStart;
|
CBlockIndex* pindex = pindexStart;
|
||||||
{
|
{
|
||||||
|
@ -911,6 +913,10 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
|
||||||
ret++;
|
ret++;
|
||||||
}
|
}
|
||||||
pindex = chainActive.Next(pindex);
|
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;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue