MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetBlockIndex

Method GetBlockIndex

src/persistence/blockdb.cpp:20–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18/********************** CBlockIndexDB ********************************/
19
20bool CBlockIndexDB::GetBlockIndex(const uint256 &hash, CDiskBlockIndex &blockIndex) {
21 return Read(dbk::GenDbKey(dbk::BLOCK_INDEX, hash), blockIndex);
22}
23
24bool CBlockIndexDB::WriteBlockIndex(const CDiskBlockIndex &blockIndex) {
25 return Write(dbk::GenDbKey(dbk::BLOCK_INDEX, blockIndex.GetBlockHash()), blockIndex);

Callers 4

UpdateBlockIndexDBFunction · 0.80
GetBlockHeaderFunction · 0.80
getinfoFunction · 0.80
getchaininfoFunction · 0.80

Calls 1

GenDbKeyFunction · 0.85

Tested by

no test coverage detected