@@ -2922,6 +2922,7 @@ bool CChainState::DisconnectTip(BlockValidationState& state, DisconnectedBlockTr
29222922
29232923 CBlockIndex *pindexDelete = m_chain.Tip ();
29242924 assert (pindexDelete);
2925+ assert (pindexDelete->pprev );
29252926 // Read block from disk.
29262927 std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
29272928 CBlock& block = *pblock;
@@ -2972,7 +2973,7 @@ bool CChainState::DisconnectTip(BlockValidationState& state, DisconnectedBlockTr
29722973 }
29732974 }
29742975
2975- m_chain.SetTip (pindexDelete->pprev );
2976+ m_chain.SetTip (* pindexDelete->pprev );
29762977
29772978 UpdateTip (pindexDelete->pprev );
29782979 // Let wallets know transactions went from 1-confirmed to
@@ -3103,7 +3104,7 @@ bool CChainState::ConnectTip(BlockValidationState& state, CBlockIndex* pindexNew
31033104 disconnectpool.removeForBlock (blockConnecting.vtx );
31043105 }
31053106 // Update m_chain & related variables.
3106- m_chain.SetTip (pindexNew);
3107+ m_chain.SetTip (* pindexNew);
31073108 UpdateTip (pindexNew);
31083109
31093110 int64_t nTime6 = GetTimeMicros (); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
@@ -4448,7 +4449,7 @@ bool CChainState::LoadChainTip()
44484449 if (!pindex) {
44494450 return false ;
44504451 }
4451- m_chain.SetTip (pindex);
4452+ m_chain.SetTip (* pindex);
44524453 PruneBlockIndexCandidates ();
44534454
44544455 tip = m_chain.Tip ();
@@ -5827,7 +5828,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
58275828 return false ;
58285829 }
58295830
5830- snapshot_chainstate.m_chain .SetTip (snapshot_start_block);
5831+ snapshot_chainstate.m_chain .SetTip (* snapshot_start_block);
58315832
58325833 // The remainder of this function requires modifying data protected by cs_main.
58335834 LOCK (::cs_main);
0 commit comments