mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
validation: Remove global ::LoadGenesisBlock
This commit is contained in:
@@ -717,7 +717,7 @@ static void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImp
|
||||
fReindex = false;
|
||||
LogPrintf("Reindexing finished\n");
|
||||
// To avoid ending up in a situation without genesis block, re-try initializing (no-op if reindexing worked):
|
||||
LoadGenesisBlock(chainparams);
|
||||
::ChainstateActive().LoadGenesisBlock(chainparams);
|
||||
}
|
||||
|
||||
// -loadblock=
|
||||
@@ -1630,7 +1630,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
|
||||
// If we're not mid-reindex (based on disk + args), add a genesis block on disk
|
||||
// (otherwise we use the one already on disk).
|
||||
// This is called again in ThreadImport after the reindex completes.
|
||||
if (!fReindex && !LoadGenesisBlock(chainparams)) {
|
||||
if (!fReindex && !::ChainstateActive().LoadGenesisBlock(chainparams)) {
|
||||
strLoadError = _("Error initializing block database");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user