aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp5
-rw-r--r--src/wallet.cpp6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2d8ac0c9bc..9fdd76101a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2844,9 +2844,10 @@ bool static LoadBlockIndexDB()
if (it == mapBlockIndex.end())
return true;
chainActive.SetTip(it->second);
- LogPrintf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s\n",
+ LogPrintf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s progress=%f\n",
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(),
- DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
+ DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
+ Checkpoints::GuessVerificationProgress(chainActive.Tip()));
return true;
}
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;