mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Fix some broken init-time prints/constants
This commit is contained in:
parent
13ab353829
commit
e7539f8649
@ -1440,8 +1440,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// At this point blocktree args are consistent with what's on disk.
|
// 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.
|
// 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.
|
// (otherwise we use the one already on disk).
|
||||||
|
// This is called again in ThreadImport after the reindex completes.
|
||||||
if (!fReindex && !LoadGenesisBlock(chainparams)) {
|
if (!fReindex && !LoadGenesisBlock(chainparams)) {
|
||||||
strLoadError = _("Error initializing block database");
|
strLoadError = _("Error initializing block database");
|
||||||
break;
|
break;
|
||||||
|
@ -75,7 +75,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
|
|||||||
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
|
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
|
||||||
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
|
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
|
||||||
if (!LoadGenesisBlock(chainparams)) {
|
if (!LoadGenesisBlock(chainparams)) {
|
||||||
throw std::runtime_error("InitBlockIndex failed.");
|
throw std::runtime_error("LoadGenesisBlock failed.");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
|
@ -3916,7 +3916,6 @@ bool LoadGenesisBlock(const CChainParams& chainparams)
|
|||||||
if (mapBlockIndex.count(chainparams.GenesisBlock().GetHash()))
|
if (mapBlockIndex.count(chainparams.GenesisBlock().GetHash()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Only add the genesis block if not reindexing (in which case we reuse the one already on disk)
|
|
||||||
try {
|
try {
|
||||||
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock());
|
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock());
|
||||||
// Start new block file
|
// Start new block file
|
||||||
|
Loading…
Reference in New Issue
Block a user