mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
[refactor] change ActiveTipChange to use CBlockIndex ref instead of ptr
This commit is contained in:
parent
7cc5ac5a67
commit
bce5f37c7b
4 changed files with 8 additions and 8 deletions
|
|
@ -3553,7 +3553,7 @@ bool Chainstate::ActivateBestChain(BlockValidationState& state, std::shared_ptr<
|
|||
} // release MempoolMutex
|
||||
// Notify external listeners about the new tip, even if pindexFork == pindexNewTip.
|
||||
if (m_chainman.m_options.signals && this == &m_chainman.ActiveChainstate()) {
|
||||
m_chainman.m_options.signals->ActiveTipChange(pindexNewTip, m_chainman.IsInitialBlockDownload());
|
||||
m_chainman.m_options.signals->ActiveTipChange(*Assert(pindexNewTip), m_chainman.IsInitialBlockDownload());
|
||||
}
|
||||
} // release cs_main
|
||||
// When we reach this point, we switched to a new tip (stored in pindexNewTip).
|
||||
|
|
@ -3778,7 +3778,7 @@ bool Chainstate::InvalidateBlock(BlockValidationState& state, CBlockIndex* pinde
|
|||
// Fire ActiveTipChange now for the current chain tip to make sure clients are notified.
|
||||
// ActivateBestChain may call this as well, but not necessarily.
|
||||
if (m_chainman.m_options.signals) {
|
||||
m_chainman.m_options.signals->ActiveTipChange(m_chain.Tip(), m_chainman.IsInitialBlockDownload());
|
||||
m_chainman.m_options.signals->ActiveTipChange(*Assert(m_chain.Tip()), m_chainman.IsInitialBlockDownload());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue