mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
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:
parent
1ecdf6ea8f
commit
e639364495
1 changed files with 1 additions and 0 deletions
|
@ -2914,6 +2914,7 @@ CBlockIndex* Chainstate::FindMostWorkChain()
|
|||
while (pindexTest != pindexFailed) {
|
||||
if (fFailedChain) {
|
||||
pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
|
||||
m_blockman.m_dirty_blockindex.insert(pindexFailed);
|
||||
} else if (fMissingData) {
|
||||
// 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
|
||||
|
|
Loading…
Add table
Reference in a new issue