diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-07-03 11:42:50 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-07-03 14:00:06 +0200 |
| commit | d0a10c1959176eb40c0ec47a56de00820c59066d (patch) | |
| tree | ed6cfc5538be698e7d7c4221b932a50a5ade00fc /src/main.cpp | |
| parent | Merge pull request #6369 (diff) | |
| parent | acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for ... (diff) | |
| download | discoin-d0a10c1959176eb40c0ec47a56de00820c59066d.tar.xz discoin-d0a10c1959176eb40c0ec47a56de00820c59066d.zip | |
Merge pull request #6329
0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index a000a81fd..624003e99 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; @@ -900,7 +901,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); @@ -971,7 +972,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 |