[refactor] change ActiveTipChange to use CBlockIndex ref instead of ptr

This commit is contained in:
glozow
2024-07-24 12:49:22 +01:00
parent 7cc5ac5a67
commit bce5f37c7b
4 changed files with 8 additions and 8 deletions

View File

@@ -489,7 +489,7 @@ public:
CTxMemPool& pool, node::Warnings& warnings, Options opts);
/** Overridden from CValidationInterface. */
void ActiveTipChange(const CBlockIndex* new_tip, bool) override
void ActiveTipChange(const CBlockIndex& new_tip, bool) override
EXCLUSIVE_LOCKS_REQUIRED(!m_tx_download_mutex);
void BlockConnected(ChainstateRole role, const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected) override
EXCLUSIVE_LOCKS_REQUIRED(!m_tx_download_mutex);
@@ -2070,7 +2070,7 @@ void PeerManagerImpl::StartScheduledTasks(CScheduler& scheduler)
scheduler.scheduleFromNow([&] { ReattemptInitialBroadcast(scheduler); }, delta);
}
void PeerManagerImpl::ActiveTipChange(const CBlockIndex* new_tip, bool is_ibd)
void PeerManagerImpl::ActiveTipChange(const CBlockIndex& new_tip, bool is_ibd)
{
AssertLockNotHeld(m_mempool.cs);
AssertLockNotHeld(m_tx_download_mutex);