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

Method LookupBlockIndex

src/node/blockstorage.cpp:39–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37static FlatFileSeq UndoFileSeq();
38
39CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash) const
40{
41 AssertLockHeld(cs_main);
42 BlockMap::const_iterator it = m_block_index.find(hash);
43 return it == m_block_index.end() ? nullptr : it->second;
44}
45
46CBlockIndex* BlockManager::AddToBlockIndex(const CBlockHeader& block)
47{

Callers 15

rest_headersFunction · 0.80
rest_blockFunction · 0.80
rest_filter_headerFunction · 0.80
rest_block_filterFunction · 0.80
AlreadyHaveBlockMethod · 0.80
ProcessGetBlockDataMethod · 0.80
ProcessHeadersMessageMethod · 0.80
ProcessMessageMethod · 0.80
SendMessagesMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by 3

BOOST_FIXTURE_TEST_CASEFunction · 0.64
BlockMethod · 0.64
FUZZ_TARGET_INITFunction · 0.64