wallet, rpc:remove settxfee and paytxfee

This commit is contained in:
Pol Espinasa
2025-03-25 19:24:43 +01:00
parent 4ae00e9a71
commit 331a5279d2
26 changed files with 118 additions and 255 deletions

View File

@@ -3027,27 +3027,6 @@ bool CWallet::LoadWalletArgs(std::shared_ptr<CWallet> wallet, const WalletContex
wallet->m_discard_rate = CFeeRate{discard_fee.value()};
}
if (const auto arg{args.GetArg("-paytxfee")}) {
warnings.push_back(_("-paytxfee is deprecated and will be fully removed in v31.0."));
std::optional<CAmount> pay_tx_fee = ParseMoney(*arg);
if (!pay_tx_fee) {
error = AmountErrMsg("paytxfee", *arg);
return false;
} else if (pay_tx_fee.value() > HIGH_TX_FEE_PER_KB) {
warnings.push_back(AmountHighWarn("-paytxfee") + Untranslated(" ") +
_("This is the transaction fee you will pay if you send a transaction."));
}
wallet->m_pay_tx_fee = CFeeRate{pay_tx_fee.value(), 1000};
if (chain && wallet->m_pay_tx_fee < chain->relayMinFee()) {
error = strprintf(_("Invalid amount for %s=<amount>: '%s' (must be at least %s)"),
"-paytxfee", *arg, chain->relayMinFee().ToString());
return false;
}
}
if (const auto arg{args.GetArg("-maxtxfee")}) {
std::optional<CAmount> max_fee = ParseMoney(*arg);
if (!max_fee) {