mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 36c83b40bd into merged_master (Bitcoin PR bitcoin/bitcoin#25023)
This commit is contained in:
commit
8e5b356a85
5 changed files with 15 additions and 16 deletions
|
|
@ -2879,6 +2879,7 @@ bool CChainState::DisconnectTip(BlockValidationState& state, DisconnectedBlockTr
|
|||
|
||||
CBlockIndex *pindexDelete = m_chain.Tip();
|
||||
assert(pindexDelete);
|
||||
assert(pindexDelete->pprev);
|
||||
// Read block from disk.
|
||||
std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
|
||||
CBlock& block = *pblock;
|
||||
|
|
@ -2926,7 +2927,7 @@ bool CChainState::DisconnectTip(BlockValidationState& state, DisconnectedBlockTr
|
|||
}
|
||||
}
|
||||
|
||||
m_chain.SetTip(pindexDelete->pprev);
|
||||
m_chain.SetTip(*pindexDelete->pprev);
|
||||
|
||||
UpdateTip(pindexDelete->pprev);
|
||||
// Let wallets know transactions went from 1-confirmed to
|
||||
|
|
@ -3056,7 +3057,7 @@ bool CChainState::ConnectTip(BlockValidationState& state, CBlockIndex* pindexNew
|
|||
disconnectpool.removeForBlock(blockConnecting.vtx);
|
||||
}
|
||||
// Update m_chain & related variables.
|
||||
m_chain.SetTip(pindexNew);
|
||||
m_chain.SetTip(*pindexNew);
|
||||
UpdateTip(pindexNew);
|
||||
|
||||
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
|
||||
|
|
@ -4360,7 +4361,7 @@ bool CChainState::LoadChainTip()
|
|||
if (!pindex) {
|
||||
return false;
|
||||
}
|
||||
m_chain.SetTip(pindex);
|
||||
m_chain.SetTip(*pindex);
|
||||
PruneBlockIndexCandidates();
|
||||
|
||||
tip = m_chain.Tip();
|
||||
|
|
@ -5438,7 +5439,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
|
|||
return false;
|
||||
}
|
||||
|
||||
snapshot_chainstate.m_chain.SetTip(snapshot_start_block);
|
||||
snapshot_chainstate.m_chain.SetTip(*snapshot_start_block);
|
||||
|
||||
// The remainder of this function requires modifying data protected by cs_main.
|
||||
LOCK(::cs_main);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue