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

Function getTip

src/bench/wallet_create_tx.cpp:57–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57TipBlock getTip(const CChainParams& params, const node::NodeContext& context)
58{
59 auto tip = WITH_LOCK(::cs_main, return context.chainman->ActiveTip());
60 return (tip) ? TipBlock{tip->GetBlockHash(), tip->GetBlockTime(), tip->nHeight} :
61 TipBlock{params.GenesisBlock().GetHash(), params.GenesisBlock().GetBlockTime(), 0};
62}
63
64void generateFakeBlock(const CChainParams& params,
65 const node::NodeContext& context,

Callers 1

generateFakeBlockFunction · 0.85

Calls 3

GetBlockHashMethod · 0.45
GetBlockTimeMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected