Merge pull request #3929

4c35366 Fix importwallet nTimeFirstKey (Cozz Lovan)
This commit is contained in:
Wladimir J. van der Laan 2014-04-03 13:50:44 +02:00
commit fecda6853d
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

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