mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-05 14:18:48 +02:00
Move validation option logging to LoadChainstate()
This commit is contained in:
@@ -920,10 +920,6 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
|
|||||||
fCheckpointsEnabled = args.GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
|
fCheckpointsEnabled = args.GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
|
||||||
|
|
||||||
hashAssumeValid = uint256S(args.GetArg("-assumevalid", chainparams.GetConsensus().defaultAssumeValid.GetHex()));
|
hashAssumeValid = uint256S(args.GetArg("-assumevalid", chainparams.GetConsensus().defaultAssumeValid.GetHex()));
|
||||||
if (!hashAssumeValid.IsNull())
|
|
||||||
LogPrintf("Assuming ancestors of block %s have valid signatures.\n", hashAssumeValid.GetHex());
|
|
||||||
else
|
|
||||||
LogPrintf("Validating signatures for all blocks.\n");
|
|
||||||
|
|
||||||
if (args.IsArgSet("-minimumchainwork")) {
|
if (args.IsArgSet("-minimumchainwork")) {
|
||||||
const std::string minChainWorkStr = args.GetArg("-minimumchainwork", "");
|
const std::string minChainWorkStr = args.GetArg("-minimumchainwork", "");
|
||||||
@@ -934,10 +930,6 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
|
|||||||
} else {
|
} else {
|
||||||
nMinimumChainWork = UintToArith256(chainparams.GetConsensus().nMinimumChainWork);
|
nMinimumChainWork = UintToArith256(chainparams.GetConsensus().nMinimumChainWork);
|
||||||
}
|
}
|
||||||
LogPrintf("Setting nMinimumChainWork=%s\n", nMinimumChainWork.GetHex());
|
|
||||||
if (nMinimumChainWork < UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) {
|
|
||||||
LogPrintf("Warning: nMinimumChainWork set below default value of %s\n", chainparams.GetConsensus().nMinimumChainWork.GetHex());
|
|
||||||
}
|
|
||||||
|
|
||||||
// block pruning; get the amount of disk space (in MiB) to allot for block & undo files
|
// block pruning; get the amount of disk space (in MiB) to allot for block & undo files
|
||||||
int64_t nPruneArg = args.GetIntArg("-prune", 0);
|
int64_t nPruneArg = args.GetIntArg("-prune", 0);
|
||||||
|
@@ -32,6 +32,16 @@ ChainstateLoadResult LoadChainstate(ChainstateManager& chainman, const CacheSize
|
|||||||
return options.reindex || options.reindex_chainstate || chainstate->CoinsTip().GetBestBlock().IsNull();
|
return options.reindex || options.reindex_chainstate || chainstate->CoinsTip().GetBestBlock().IsNull();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!hashAssumeValid.IsNull()) {
|
||||||
|
LogPrintf("Assuming ancestors of block %s have valid signatures.\n", hashAssumeValid.GetHex());
|
||||||
|
} else {
|
||||||
|
LogPrintf("Validating signatures for all blocks.\n");
|
||||||
|
}
|
||||||
|
LogPrintf("Setting nMinimumChainWork=%s\n", nMinimumChainWork.GetHex());
|
||||||
|
if (nMinimumChainWork < UintToArith256(chainman.GetConsensus().nMinimumChainWork)) {
|
||||||
|
LogPrintf("Warning: nMinimumChainWork set below default value of %s\n", chainman.GetConsensus().nMinimumChainWork.GetHex());
|
||||||
|
}
|
||||||
|
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
chainman.InitializeChainstate(options.mempool);
|
chainman.InitializeChainstate(options.mempool);
|
||||||
chainman.m_total_coinstip_cache = cache_sizes.coins;
|
chainman.m_total_coinstip_cache = cache_sizes.coins;
|
||||||
|
Reference in New Issue
Block a user