MCPcopy Create free account
hub / github.com/LUX-Core/lux / LoadBlockIndex

Function LoadBlockIndex

src/main.cpp:5725–5740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5723}
5724
5725bool LoadBlockIndex()
5726{
5727 // Load block index from databases
5728 bool needs_init = fReindex;
5729 if (!fReindex) {
5730 bool ret = LoadBlockIndexDB();
5731 if (!ret) return false;
5732 needs_init = mapBlockIndex.empty();
5733 }
5734 if (needs_init) {
5735 // Use the provided setting for -logevents in the new database
5736 fLogEvents = GetBoolArg("-logevents", DEFAULT_LOGEVENTS);
5737 pblocktree->WriteFlag("logevents", fLogEvents);
5738 }
5739 return true;
5740}
5741
5742
5743bool InitBlockIndex(const CChainParams& chainparams)

Callers 1

AppInit2Function · 0.85

Calls 4

LoadBlockIndexDBFunction · 0.85
GetBoolArgFunction · 0.85
WriteFlagMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected