diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-13 11:04:18 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-13 11:04:31 +0100 |
commit | c49551886a751d521c8b25b2e05a6abcbabb299d (patch) | |
tree | e6206e37ef0abb4e0c5fbfb23e9bbda321eaa181 /src/init.cpp | |
parent | 18ca3fa84058fba54a4ac346b7a91bc2487d5557 (diff) | |
parent | bebe58b748532157958f9055e4517e280684006c (diff) |
Merge pull request #7296
bebe58b SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee (Alex Morcos)
e420a1b Add sane fallback for fee estimation (Alex Morcos)
995b9f3 Always respect GetRequiredFee for wallet txs (Alex Morcos)
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 220df5ebf7..374e756abd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -393,6 +393,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageGroup(_("Wallet options:")); strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls")); strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), DEFAULT_KEYPOOL_SIZE)); + strUsage += HelpMessageOpt("-fallbackfee=<amt>", strprintf(_("A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)"), + CURRENCY_UNIT, FormatMoney(DEFAULT_FALLBACK_FEE))); strUsage += HelpMessageOpt("-mintxfee=<amt>", strprintf(_("Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MINFEE))); strUsage += HelpMessageOpt("-paytxfee=<amt>", strprintf(_("Fee (in %s/kB) to add to transactions you send (default: %s)"), @@ -959,6 +961,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) else return InitError(AmountErrMsg("mintxfee", mapArgs["-mintxfee"])); } + if (mapArgs.count("-fallbackfee")) + { + CAmount nFeePerK = 0; + if (!ParseMoney(mapArgs["-fallbackfee"], nFeePerK)) + return InitError(strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), mapArgs["-fallbackfee"])); + if (nFeePerK > nHighTransactionFeeWarning) + InitWarning(_("-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.")); + CWallet::fallbackFee = CFeeRate(nFeePerK); + } if (mapArgs.count("-paytxfee")) { CAmount nFeePerK = 0; |