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

Method ReadBestBlock

src/index/base.cpp:78–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76{}
77
78CBlockLocator BaseIndex::DB::ReadBestBlock() const
79{
80 CBlockLocator locator;
81
82 bool success = Read(DB_BEST_BLOCK, locator);
83 if (!success) {
84 locator.SetNull();
85 }
86
87 return locator;
88}
89
90void BaseIndex::DB::WriteBestBlock(CDBBatch& batch, const CBlockLocator& locator)
91{

Callers 1

InitMethod · 0.45

Calls 1

SetNullMethod · 0.45

Tested by

no test coverage detected