Skip to content

Commit e7539f8

Browse files
committed
Fix some broken init-time prints/constants
1 parent 13ab353 commit e7539f8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/init.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
14401440
}
14411441

14421442
// At this point blocktree args are consistent with what's on disk.
1443-
// If we're not mid-reindex (based on disk + args), add a genesis block on disk.
1444-
// This is called again in ThreadImport in the reindex completes.
1443+
// If we're not mid-reindex (based on disk + args), add a genesis block on disk
1444+
// (otherwise we use the one already on disk).
1445+
// This is called again in ThreadImport after the reindex completes.
14451446
if (!fReindex && !LoadGenesisBlock(chainparams)) {
14461447
strLoadError = _("Error initializing block database");
14471448
break;

src/test/test_bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
7575
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
7676
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
7777
if (!LoadGenesisBlock(chainparams)) {
78-
throw std::runtime_error("InitBlockIndex failed.");
78+
throw std::runtime_error("LoadGenesisBlock failed.");
7979
}
8080
{
8181
CValidationState state;

src/validation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3916,7 +3916,6 @@ bool LoadGenesisBlock(const CChainParams& chainparams)
39163916
if (mapBlockIndex.count(chainparams.GenesisBlock().GetHash()))
39173917
return true;
39183918

3919-
// Only add the genesis block if not reindexing (in which case we reuse the one already on disk)
39203919
try {
39213920
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock());
39223921
// Start new block file

0 commit comments

Comments
 (0)