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

Method LookupBlockIndex

src/node/blockstorage.cpp:210–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash)
211{
212 AssertLockHeld(cs_main);
213 BlockMap::iterator it = m_block_index.find(hash);
214 return it == m_block_index.end() ? nullptr : &it->second;
215}
216
217const CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash) const
218{

Callers 15

rest_headersFunction · 0.80
rest_spent_txoutsFunction · 0.80
rest_blockFunction · 0.80
rest_filter_headerFunction · 0.80
rest_block_filterFunction · 0.80
rest_deploymentinfoFunction · 0.80
AlreadyHaveBlockMethod · 0.80
ProcessGetBlockDataMethod · 0.80
ProcessHeadersMessageMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by 2

BOOST_FIXTURE_TEST_CASEFunction · 0.64
utxo_snapshot_fuzzFunction · 0.64