MCPcopy Create free account
hub / github.com/ElementsProject/elements / Height

Method Height

src/chain.h:614–617  ·  view source on GitHub ↗

Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */

Source from the content-addressed store, hash-verified

612
613 /** Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */
614 int Height() const
615 {
616 return int(vChain.size()) - 1;
617 }
618
619 /** Set/initialize a chain with a given tip. */
620 void SetTip(CBlockIndex* pindex);

Callers 15

ActiveHeightMethod · 0.80
rest_getutxosFunction · 0.80
rest_blockhash_by_heightFunction · 0.80
ProcessGetBlockDataMethod · 0.80
ProcessMessageMethod · 0.80
AppInitMainFunction · 0.80
FindForkInGlobalIndexMethod · 0.80
EXCLUSIVE_LOCKS_REQUIREDFunction · 0.80
PreChecksMethod · 0.80
InvalidChainFoundMethod · 0.80
FlushStateToDiskMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by 7

BOOST_FIXTURE_TEST_CASEFunction · 0.64
CreateSyncedWalletFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64
FinishFunction · 0.64