validation: add missing insert to m_dirty_blockindex
...in FindMostWorkChain(). Before this, it was possible that the change to the block index wouldn't be persisted to disk.
This commit is contained in:
1 parent
1ecdf6ea8f
commit
e639364495
1 file changed
+1
@@ -2914,6 +2914,7 @@ CBlockIndex* Chainstate::FindMostWorkChain()
|
|||||||
while (pindexTest != pindexFailed) {
|
while (pindexTest != pindexFailed) {
|
||||||
if (fFailedChain) {
|
if (fFailedChain) {
|
||||||
pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
|
pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
|
||||||
|
m_blockman.m_dirty_blockindex.insert(pindexFailed);
|
||||||
} else if (fMissingData) {
|
} else if (fMissingData) {
|
||||||
// If we're missing data, then add back to m_blocks_unlinked,
|
// If we're missing data, then add back to m_blocks_unlinked,
|
||||||
// so that if the block arrives in the future we can try adding
|
// so that if the block arrives in the future we can try adding
|
||||||
|
|||||||
Reference in new issue
Block a user