mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-16 23:53:29 +01:00
Merge pull request #7296
bebe58bSQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee (Alex Morcos)e420a1bAdd sane fallback for fee estimation (Alex Morcos)995b9f3Always respect GetRequiredFee for wallet txs (Alex Morcos)
This commit is contained in:
11
src/init.cpp
11
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;
|
||||
|
||||
Reference in New Issue
Block a user