mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only
This commit is contained in:
@@ -57,6 +57,7 @@ bool fTxIndex = false;
|
||||
bool fHavePruned = false;
|
||||
bool fPruneMode = false;
|
||||
bool fIsBareMultisigStd = true;
|
||||
bool fRequireStandard = true;
|
||||
bool fCheckBlockIndex = false;
|
||||
bool fCheckpointsEnabled = true;
|
||||
size_t nCoinCacheUsage = 5000 * 300;
|
||||
@@ -898,7 +899,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
|
||||
// Rather not work on nonstandard transactions (unless -testnet/-regtest)
|
||||
string reason;
|
||||
if (Params().RequireStandard() && !IsStandardTx(tx, reason))
|
||||
if (fRequireStandard && !IsStandardTx(tx, reason))
|
||||
return state.DoS(0,
|
||||
error("AcceptToMemoryPool: nonstandard transaction: %s", reason),
|
||||
REJECT_NONSTANDARD, reason);
|
||||
@@ -969,7 +970,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
}
|
||||
|
||||
// Check for non-standard pay-to-script-hash in inputs
|
||||
if (Params().RequireStandard() && !AreInputsStandard(tx, view))
|
||||
if (fRequireStandard && !AreInputsStandard(tx, view))
|
||||
return error("AcceptToMemoryPool: nonstandard transaction input");
|
||||
|
||||
// Check that the transaction doesn't have an excessive number of
|
||||
|
||||
Reference in New Issue
Block a user