diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-07-03 11:42:50 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-07-03 14:00:06 +0200 |
commit | d0a10c1959176eb40c0ec47a56de00820c59066d (patch) | |
tree | ed6cfc5538be698e7d7c4221b932a50a5ade00fc /src/init.cpp | |
parent | 5bd26efbf652b4d0d0a2d6679f76bd163c188e59 (diff) | |
parent | 0c376340a4efa2842e9ffd1d93eca9895b4a9391 (diff) |
Merge pull request #6329
0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 94bf5eb2f4..d30a9a3f88 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -394,6 +394,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-testnet", _("Use the test network")); strUsage += HelpMessageGroup(_("Node relay options:")); + if (showDebug) + strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard())); strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), 1)); strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY)); @@ -817,6 +819,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return InitError(strprintf(_("Invalid amount for -minrelaytxfee=<amount>: '%s'"), mapArgs["-minrelaytxfee"])); } + fRequireStandard = !GetBoolArg("-acceptnonstdtxn", !Params().RequireStandard()); + if (Params().RequireStandard() && !fRequireStandard) + return InitError(strprintf("acceptnonstdtxn is not currently supported for %s chain", chainparams.NetworkIDString())); + #ifdef ENABLE_WALLET if (mapArgs.count("-mintxfee")) { |