mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Remove unused SetTip(nullptr) code
This commit is contained in:
@@ -2578,6 +2578,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;
|
||||
@@ -2625,7 +2626,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
|
||||
@@ -2739,7 +2740,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;
|
||||
@@ -3887,7 +3888,7 @@ bool CChainState::LoadChainTip()
|
||||
if (!pindex) {
|
||||
return false;
|
||||
}
|
||||
m_chain.SetTip(pindex);
|
||||
m_chain.SetTip(*pindex);
|
||||
PruneBlockIndexCandidates();
|
||||
|
||||
tip = m_chain.Tip();
|
||||
@@ -4964,7 +4965,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);
|
||||
|
||||
Reference in New Issue
Block a user