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

Method Contains

src/chain.h:599–602  ·  view source on GitHub ↗

Efficiently check whether a block is present in this chain. */

Source from the content-addressed store, hash-verified

597
598 /** Efficiently check whether a block is present in this chain. */
599 bool Contains(const CBlockIndex* pindex) const
600 {
601 return (*this)[pindex->nHeight] == pindex;
602 }
603
604 /** Find the successor of a block in this chain, or nullptr if the given index is not found or is the tip. */
605 CBlockIndex* Next(const CBlockIndex* pindex) const

Callers 9

rest_headersFunction · 0.45
rest_filter_headerFunction · 0.45
TestLockPointValidityFunction · 0.45
BlockRequestAllowedMethod · 0.45
ProcessHeadersMessageMethod · 0.45
FindForkInGlobalIndexMethod · 0.45
FindMostWorkChainMethod · 0.45
InvalidateBlockMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestLockPointValidityFunction · 0.36