MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Init

Method Init

src/index/base.cpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55bool BaseIndex::Init()
56{
57 CBlockLocator locator;
58 if (!GetDB().ReadBestBlock(locator)) {
59 locator.SetNull();
60 }
61
62 LOCK(cs_main);
63 m_best_block_index = FindForkInGlobalIndex(chainActive, locator);
64 m_synced = m_best_block_index.load() == chainActive.Tip();
65 return true;
66}
67
68static const CBlockIndex* NextSyncBlock(const CBlockIndex* pindex_prev)
69{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.45
PrevectorDeserializeFunction · 0.45

Calls 4

FindForkInGlobalIndexFunction · 0.85
ReadBestBlockMethod · 0.45
SetNullMethod · 0.45
TipMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36