diff options
| author | Patrick Lodder <[email protected]> | 2021-06-27 00:37:10 +0200 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2021-08-05 18:24:17 +0200 |
| commit | 4c46af04830cec3da6ecfbf677ef3d826a5892e6 (patch) | |
| tree | 8e2c6490458c57ff690788195b298cc4edd07891 /src/init.cpp | |
| parent | Merge pull request #2415 from rnicoll/1.14.4-rbf-fee (diff) | |
| download | discoin-4c46af04830cec3da6ecfbf677ef3d826a5892e6.tar.xz discoin-4c46af04830cec3da6ecfbf677ef3d826a5892e6.zip | |
[fees] introduce configurable hard dust limit
Co-authored-by: Ross Nicoll <[email protected]>
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 22dc45929..dd1942133 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -475,6 +475,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-incrementalrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to define cost of relay, used for mempool limiting and BIP 125 replacement. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_INCREMENTAL_RELAY_FEE))); strUsage += HelpMessageOpt("-dustrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to defined dust, the value of an output such that it will cost about 1/3 of its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE))); } + strUsage += HelpMessageOpt("-dustlimit=<amt>", strprintf(_("Amount under which a transaction output is considered dust, in %s (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_DUST_LIMIT))); strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP)); strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER)); strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY)); @@ -1043,6 +1044,14 @@ bool AppInitParameterInteraction() return InitError(strprintf("acceptnonstdtxn is not currently supported for %s chain", chainparams.NetworkIDString())); nBytesPerSigOp = GetArg("-bytespersigop", nBytesPerSigOp); + if (IsArgSet("-dustlimit")) + { + CAmount n = nDustLimit; + if (!ParseMoney(GetArg("-dustlimit", ""), n)) + return InitError(AmountErrMsg("dustlimit", GetArg("-dustlimit", ""))); + nDustLimit = n; + } + #ifdef ENABLE_WALLET if (!CWallet::ParameterInteraction()) return false; |