mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Merge #10265: [wallet] [moveonly] Check non-null pindex before potentially referencing
c36ea69
[wallet] Make sure pindex is non-null before possibly referencing in LogPrintf call. (Karl-Johan Alm)
Tree-SHA512: a14c9f3e1228bca91977bea821c56a377d80889b41d250050c9be67aa93e460319a7cf1d4b63ee40f23b5a34159590f0e3fe15dc88698dc694c0c8098bd2db4d
This commit is contained in:
parent
24be65e87a
commit
e2225f37c2
@ -1865,6 +1865,10 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool f
|
||||
{
|
||||
if (pindex->nHeight % 100 == 0 && dProgressTip - dProgressStart > 0.0)
|
||||
ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((GuessVerificationProgress(chainParams.TxData(), pindex) - dProgressStart) / (dProgressTip - dProgressStart) * 100))));
|
||||
if (GetTime() >= nNow + 60) {
|
||||
nNow = GetTime();
|
||||
LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->nHeight, GuessVerificationProgress(chainParams.TxData(), pindex));
|
||||
}
|
||||
|
||||
CBlock block;
|
||||
if (ReadBlockFromDisk(block, pindex, Params().GetConsensus())) {
|
||||
@ -1878,10 +1882,6 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool f
|
||||
ret = nullptr;
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
ShowProgress(_("Rescanning..."), 100); // hide progress dialog in GUI
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user