Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,751 Lines • ▼ Show 20 Lines | CBlockIndex *ret = nullptr; | ||||
_("Rescanning..."), | _("Rescanning..."), | ||||
std::max(1, std::min<int>( | std::max(1, std::min<int>( | ||||
99, (GuessVerificationProgress( | 99, (GuessVerificationProgress( | ||||
chainParams.TxData(), pindex) - | chainParams.TxData(), pindex) - | ||||
dProgressStart) / | dProgressStart) / | ||||
(dProgressTip - dProgressStart) * | (dProgressTip - dProgressStart) * | ||||
100))); | 100))); | ||||
} | } | ||||
if (GetTime() >= nNow + 60) { | |||||
nNow = GetTime(); | |||||
LogPrintf( | |||||
"Still rescanning. At block %d. Progress=%f\n", | |||||
pindex->nHeight, | |||||
GuessVerificationProgress(chainParams.TxData(), pindex)); | |||||
} | |||||
CBlock block; | CBlock block; | ||||
if (ReadBlockFromDisk(block, pindex, GetConfig())) { | if (ReadBlockFromDisk(block, pindex, GetConfig())) { | ||||
for (size_t posInBlock = 0; posInBlock < block.vtx.size(); | for (size_t posInBlock = 0; posInBlock < block.vtx.size(); | ||||
++posInBlock) { | ++posInBlock) { | ||||
AddToWalletIfInvolvingMe(block.vtx[posInBlock], pindex, | AddToWalletIfInvolvingMe(block.vtx[posInBlock], pindex, | ||||
posInBlock, fUpdate); | posInBlock, fUpdate); | ||||
} | } | ||||
} else { | } else { | ||||
ret = pindex; | ret = pindex; | ||||
} | } | ||||
if (pindex == pindexStop) { | if (pindex == pindexStop) { | ||||
break; | break; | ||||
} | } | ||||
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, | |||||
GuessVerificationProgress(chainParams.TxData(), pindex)); | |||||
} | |||||
} | } | ||||
if (pindex && fAbortRescan) { | if (pindex && fAbortRescan) { | ||||
LogPrintf("Rescan aborted at block %d. Progress=%f\n", | LogPrintf("Rescan aborted at block %d. Progress=%f\n", | ||||
pindex->nHeight, | pindex->nHeight, | ||||
GuessVerificationProgress(chainParams.TxData(), pindex)); | GuessVerificationProgress(chainParams.TxData(), pindex)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,686 Lines • Show Last 20 Lines |