mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: correct is_snapshot_cs in VerifyDB
Similar changes in bitcoin/bitcoin#27596: assumeutxo (2)
This commit is contained in:
parent
df07c38151
commit
bf377d47e5
@ -4063,7 +4063,7 @@ bool CVerifyDB::VerifyDB(
|
|||||||
int reportDone = 0;
|
int reportDone = 0;
|
||||||
LogPrintf("[0%%]..."); /* Continued */
|
LogPrintf("[0%%]..."); /* Continued */
|
||||||
|
|
||||||
const bool is_snapshot_cs{!chainstate.m_from_snapshot_blockhash};
|
const bool is_snapshot_cs{chainstate.m_from_snapshot_blockhash};
|
||||||
|
|
||||||
for (pindex = chainstate.m_chain.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) {
|
for (pindex = chainstate.m_chain.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) {
|
||||||
const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));
|
const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));
|
||||||
|
Loading…
Reference in New Issue
Block a user