aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-03-21 14:08:26 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-03-21 14:23:45 +0100
commit4c35366bdc63c5fbb46be0ce062fe61a33b9a1cc (patch)
tree24e4a1d5e82c6bf707245015c08fe8156d86db00 /src
parent178d6a1b65d5466b57573e0f46e54d45a88a90f3 (diff)
Fix importwallet nTimeFirstKey
Diffstat (limited to 'src')
-rw-r--r--src/rpcdump.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 41f2a57eca..9a24a99c17 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -212,6 +212,9 @@ Value importwallet(const Array& params, bool fHelp)
while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200)
pindex = pindex->pprev;
+ if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey)
+ pwalletMain->nTimeFirstKey = nTimeBegin;
+
LogPrintf("Rescanning last %i blocks\n", chainActive.Height() - pindex->nHeight + 1);
pwalletMain->ScanForWalletTransactions(pindex);
pwalletMain->MarkDirty();