Ensure conflicting flags are reported as an error.
This commit is contained in:
parent
2c051acae5
commit
8a2aaebd7e
|
@ -967,6 +967,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
fIBDSkipTxVerification = GetBoolArg("-ibdskiptxverification", DEFAULT_IBD_SKIP_TX_VERIFICATION);
|
||||
fCheckpointsEnabled = GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
|
||||
|
||||
if (fIBDSkipTxVerification && !fCheckpointsEnabled) {
|
||||
return InitError(_("-ibdskiptxverification requires checkpoints to be enabled; it is incompatible with -nocheckpoints"));
|
||||
}
|
||||
|
||||
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
|
||||
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
|
||||
if (nScriptCheckThreads <= 0)
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -4285,12 +4285,11 @@ static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state
|
|||
|
||||
/**
|
||||
* Store block on disk.
|
||||
* If dbp is non-NULL, the file is known to already reside on disk.
|
||||
*
|
||||
* JoinSplit proofs are not verified here; the only caller of AcceptBlock
|
||||
* (ProcessNewBlock) invokes ActivateBestChain, which ultimately calls
|
||||
* (ProcessNewBlock) later invokes ActivateBestChain, which ultimately calls
|
||||
* ConnectBlock in a manner that can verify the proofs
|
||||
*
|
||||
* If dbp is non-NULL, the file is known to already reside on disk
|
||||
*/
|
||||
static bool AcceptBlock(const CBlock& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, CDiskBlockPos* dbp)
|
||||
{
|
||||
|
@ -4322,10 +4321,7 @@ static bool AcceptBlock(const CBlock& block, CValidationState& state, const CCha
|
|||
if (fTooFarAhead) return true; // Block height is too high
|
||||
}
|
||||
|
||||
// See method docstring for why this is always disabled. The only caller of
|
||||
// AcceptBlock (ProcessNewBlock) will fully check proofs when it eventually
|
||||
// delegates to `ConnectTip` and thereafter `ConnectBlock`. This
|
||||
// arrangement is a bit fragile and should be reconsidered.
|
||||
// See method docstring for why this is always disabled.
|
||||
auto verifier = ProofVerifier::Disabled();
|
||||
bool skipTxVerification = IBDSkipTxVerification(chainparams, pindex);
|
||||
if ((!CheckBlock(block, state, chainparams, verifier, true, true, !skipTxVerification)) ||
|
||||
|
|
Loading…
Reference in New Issue