Skip to content

Commit 27f99b6

Browse files
committed
validation: Don't assume m_chain_tx_count in GuessVerificationProgress
In the context of an a descriptor import during assumeutxo background sync, the progress can not be estimated due to m_chain_tx_count being set to 0.
1 parent 42d5d53 commit 27f99b6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/validation.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5623,9 +5623,8 @@ double ChainstateManager::GuessVerificationProgress(const CBlockIndex* pindex) c
56235623
return 0.0;
56245624
}
56255625

5626-
if (!Assume(pindex->m_chain_tx_count > 0)) {
5627-
LogWarning("Internal bug detected: block %d has unset m_chain_tx_count (%s %s). Please report this issue here: %s\n",
5628-
pindex->nHeight, CLIENT_NAME, FormatFullVersion(), CLIENT_BUGREPORT);
5626+
if (pindex->m_chain_tx_count == 0) {
5627+
LogDebug(BCLog::VALIDATION, "Block %d has unset m_chain_tx_count. Unable to estimate verification progress.\n", pindex->nHeight);
56295628
return 0.0;
56305629
}
56315630

0 commit comments

Comments
 (0)