Issue Details

Number
29220
Title
`-maxtxfee` is used as a fee and a feerate
Description
The `-maxtxfee` (which is put into `m_default_max_tx_fee`) is documented as "the maximum total fees to use in a single wallet transaction" https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/wallet/init.cpp#L63 This seems true in many instances when we look at the code: https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/wallet/spend.cpp#L1293-L1295 https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/wallet/feebumper.cpp#L114-L119 https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/node/transaction.cpp#L71-L79 But there are also places where this value is used as a feerate per KvB: https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/wallet/wallet.cpp#L3061-L3064 https://github.com/bitcoin/bitcoin/blob/632a2bb731804dffe52bd4cbd90bfee352d25ede/src/wallet/rpc/spend.cpp#L433 I don't think these instances of conversions to feerate result in anything very problematic, but it doesn't make sense to just convert this fee to a feerate because not every tx is the same size. I can see why a wallet user might want a maximum fee and maximum feerate. So my suggested solution is to have both: add a `-maxfeerate` and put those checks under the new value.
URL
https://github.com/bitcoin/bitcoin/issue/29220
Closed by
#29278
Back to List