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

Method GetAllBlockIndices

src/node/blockstorage.cpp:199–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199std::vector<CBlockIndex*> BlockManager::GetAllBlockIndices()
200{
201 AssertLockHeld(cs_main);
202 std::vector<CBlockIndex*> rv;
203 rv.reserve(m_block_index.size());
204 for (auto& [_, block_index] : m_block_index) {
205 rv.push_back(&block_index);
206 }
207 return rv;
208}
209
210CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash)
211{

Callers 2

LoadBlockIndexMethod · 0.80

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected