diff options
author | Alex Morcos <morcos@chaincode.com> | 2016-12-13 11:51:51 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-01-04 13:24:19 -0500 |
commit | daec955fd68bd0da036a5b446b54ffb01108adcd (patch) | |
tree | bb6fd4c8f21fa9f4399409dd463d27485ad4fc52 /src/init.cpp | |
parent | 123ea7362478cfe801341e8fecade030a903ad3d (diff) |
Introduce -blockmintxfee
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index f0334a08e3..b0c045da15 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -476,6 +476,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT)); strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE)); strUsage += HelpMessageOpt("-blockprioritysize=<n>", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE)); + strUsage += HelpMessageOpt("-blockmintxfee=<amt>", strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE))); if (showDebug) strUsage += HelpMessageOpt("-blockversion=<n>", "Override block version to test forking scenarios"); @@ -970,6 +971,15 @@ bool AppInitParameterInteraction() ::minRelayTxFee = CFeeRate(n); } + // Sanity check argument for min fee for including tx in block + // TODO: Harmonize which arguments need sanity checking and where that happens + if (IsArgSet("-blockmintxfee")) + { + CAmount n = 0; + if (!ParseMoney(GetArg("-blockmintxfee", ""), n)) + return InitError(AmountErrMsg("blockmintxfee", GetArg("-blockmintxfee", ""))); + } + fRequireStandard = !GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard()); if (chainparams.RequireStandard() && !fRequireStandard) return InitError(strprintf("acceptnonstdtxn is not currently supported for %s chain", chainparams.NetworkIDString())); |