Fix importwallet nTimeFirstKey

This commit is contained in:
Cozz Lovan 2014-03-21 14:08:26 +01:00
parent 178d6a1b65
commit 4c35366bdc

View file

@ -212,6 +212,9 @@ Value importwallet(const Array& params, bool fHelp)
while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200) while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200)
pindex = pindex->pprev; pindex = pindex->pprev;
if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey)
pwalletMain->nTimeFirstKey = nTimeBegin;
LogPrintf("Rescanning last %i blocks\n", chainActive.Height() - pindex->nHeight + 1); LogPrintf("Rescanning last %i blocks\n", chainActive.Height() - pindex->nHeight + 1);
pwalletMain->ScanForWalletTransactions(pindex); pwalletMain->ScanForWalletTransactions(pindex);
pwalletMain->MarkDirty(); pwalletMain->MarkDirty();