MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetTip

Function GetTip

src/node/miner.cpp:517–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517std::optional<BlockRef> GetTip(ChainstateManager& chainman)
518{
519 LOCK(::cs_main);
520 CBlockIndex* tip{chainman.ActiveChain().Tip()};
521 if (!tip) return {};
522 return BlockRef{tip->GetBlockHash(), tip->nHeight};
523}
524
525bool CooldownIfHeadersAhead(ChainstateManager& chainman, KernelNotifications& kernel_notifications, const BlockRef& last_tip, bool& interrupt_mining)
526{

Callers 2

WaitTipChangedFunction · 0.85
getTipMethod · 0.85

Calls 2

TipMethod · 0.45
GetBlockHashMethod · 0.45

Tested by

no test coverage detected