mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 18:09:47 +01:00
Merge #13199: Bugfix: ensure consistency of m_failed_blocks after reconsiderblock
11fa6bb66e
Bugfix: ensure consistency of m_failed_blocks after reconsiderblock (Suhas Daftuar) Pull request description: This was introduced in015a5258ad
and could cause a node to crash (due to assertion failure) when using the `reconsiderblock` rpc. Tree-SHA512: 820dcd761bf983e36f5d0f16777ed75c833daaf62a6b3a4dbd17f6caaf9287223e3a202d06540ac62f8ba72926b73b0873bb76c6273ddcb19d9408f4c1cd325e
This commit is contained in:
commit
418ae49ee1
@ -2841,6 +2841,7 @@ bool CChainState::ResetBlockFailureFlags(CBlockIndex *pindex) {
|
||||
if (pindex->nStatus & BLOCK_FAILED_MASK) {
|
||||
pindex->nStatus &= ~BLOCK_FAILED_MASK;
|
||||
setDirtyBlockIndex.insert(pindex);
|
||||
m_failed_blocks.erase(pindex);
|
||||
}
|
||||
pindex = pindex->pprev;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user