mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only
This commit is contained in:
@@ -395,6 +395,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));
|
||||
|
||||
@@ -803,6 +805,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"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user