aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-05-12 11:24:36 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-05-12 11:32:09 -0700
commit418ae49ee1eac2c9d6cd4ba83c036a41f1afe922 (patch)
tree0491aab571565a2ec90f7381484a64e72359f9af
parent6af005c3ebe923fa4ad9649d5b345fb351d3fa94 (diff)
parent11fa6bb66e8c1562305d034903a0dc6aee6eea20 (diff)
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 in 015a5258adffb0cf394f387a95ac9c8afc34cfc3 and could cause a node to crash (due to assertion failure) when using the `reconsiderblock` rpc. Tree-SHA512: 820dcd761bf983e36f5d0f16777ed75c833daaf62a6b3a4dbd17f6caaf9287223e3a202d06540ac62f8ba72926b73b0873bb76c6273ddcb19d9408f4c1cd325e
-rw-r--r--src/validation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index cd5f9d8ec0..f22ae7f9be 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -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;
}