mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Allow the long term feerate to be configured, default of 10 sat/vb
The long term feerate is really the highest feerate that the user is comfortable with making consolidatory transactions. This is should thus be something that can be configured by the user via a new startup option -consolidatefeerate. The default value is 10 sat/vbyte, chosen arbitrarily (it seems like a reasonable number).
This commit is contained in:
@@ -2701,6 +2701,15 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
|
||||
walletInstance->m_default_max_tx_fee = max_fee.value();
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-consolidatefeerate")) {
|
||||
if (std::optional<CAmount> consolidate_feerate = ParseMoney(gArgs.GetArg("-consolidatefeerate", ""))) {
|
||||
walletInstance->m_consolidate_feerate = CFeeRate(*consolidate_feerate);
|
||||
} else {
|
||||
error = AmountErrMsg("consolidatefeerate", gArgs.GetArg("-consolidatefeerate", ""));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (chain && chain->relayMinFee().GetFeePerK() > HIGH_TX_FEE_PER_KB) {
|
||||
warnings.push_back(AmountHighWarn("-minrelaytxfee") + Untranslated(" ") +
|
||||
_("The wallet will avoid paying less than the minimum relay fee."));
|
||||
|
||||
Reference in New Issue
Block a user