kernel: remove btck_chain_get_tip

It is equivalent to calling btck_chain_get_by_height with the
height obtained from btck_chain_get_height. In neither case do we
provide guarantees that the returned block index still corresponds
to the actual tip.
This commit is contained in:
stickies-v
2025-11-07 16:43:20 +00:00
parent 4dd7e6dc48
commit 66978a1a95
4 changed files with 3 additions and 24 deletions

View File

@@ -1230,12 +1230,6 @@ const btck_Chain* btck_chainstate_manager_get_active_chain(const btck_Chainstate
return btck_Chain::ref(&WITH_LOCK(btck_ChainstateManager::get(chainman).m_chainman->GetMutex(), return btck_ChainstateManager::get(chainman).m_chainman->ActiveChain()));
}
const btck_BlockTreeEntry* btck_chain_get_tip(const btck_Chain* chain)
{
LOCK(::cs_main);
return btck_BlockTreeEntry::ref(btck_Chain::get(chain).Tip());
}
int btck_chain_get_height(const btck_Chain* chain)
{
LOCK(::cs_main);