Fix some broken init-time prints/constants

This commit is contained in:
Matt Corallo 2017-08-01 17:02:10 -04:00
parent 13ab353829
commit e7539f8649
3 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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