Skip to content

Commit 418ae49

Browse files
committed
Merge #13199: Bugfix: ensure consistency of m_failed_blocks after reconsiderblock
11fa6bb Bugfix: ensure consistency of m_failed_blocks after reconsiderblock (Suhas Daftuar) Pull request description: This was introduced in 015a525 and could cause a node to crash (due to assertion failure) when using the `reconsiderblock` rpc. Tree-SHA512: 820dcd761bf983e36f5d0f16777ed75c833daaf62a6b3a4dbd17f6caaf9287223e3a202d06540ac62f8ba72926b73b0873bb76c6273ddcb19d9408f4c1cd325e
2 parents 6af005c + 11fa6bb commit 418ae49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/validation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,6 +2841,7 @@ bool CChainState::ResetBlockFailureFlags(CBlockIndex *pindex) {
28412841
if (pindex->nStatus & BLOCK_FAILED_MASK) {
28422842
pindex->nStatus &= ~BLOCK_FAILED_MASK;
28432843
setDirtyBlockIndex.insert(pindex);
2844+
m_failed_blocks.erase(pindex);
28442845
}
28452846
pindex = pindex->pprev;
28462847
}

0 commit comments

Comments
 (0)