mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user