Browse Source

Fix some broken init-time prints/constants

0.15
Matt Corallo 7 years ago
parent
commit
e7539f8649
  1. 5
      src/init.cpp
  2. 2
      src/test/test_bitcoin.cpp
  3. 1
      src/validation.cpp

5
src/init.cpp

@ -1440,8 +1440,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) @@ -1440,8 +1440,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
}
// At this point blocktree args are consistent with what's on disk.
// If we're not mid-reindex (based on disk + args), add a genesis block on disk.
// This is called again in ThreadImport in the reindex completes.
// 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)) {
strLoadError = _("Error initializing block database");
break;

2
src/test/test_bitcoin.cpp

@ -75,7 +75,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha @@ -75,7 +75,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
if (!LoadGenesisBlock(chainparams)) {
throw std::runtime_error("InitBlockIndex failed.");
throw std::runtime_error("LoadGenesisBlock failed.");
}
{
CValidationState state;

1
src/validation.cpp

@ -3916,7 +3916,6 @@ bool LoadGenesisBlock(const CChainParams& chainparams) @@ -3916,7 +3916,6 @@ bool LoadGenesisBlock(const CChainParams& chainparams)
if (mapBlockIndex.count(chainparams.GenesisBlock().GetHash()))
return true;
// Only add the genesis block if not reindexing (in which case we reuse the one already on disk)
try {
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock());
// Start new block file

Loading…
Cancel
Save