This would allow ad hoc transaction batching. When a wallet transaction is unconfirmed, I’d like to be able to add an additional destination / output. BIP 125 requires that such a transaction also increases the fee rate.
One approach would be to create a new wallet RPC `addoutput, which takes a transaction hash, address, amount and fee rate (difference).
A better approach imo would be to add a new argument extra_outputs
to bumpfee
(and psbtbumpfee
). This would have the same format as outputs
in send.
Two complications come to mind:
- If the original transaction used
subtract_fee_from_outputs
we don’t store that information (see also #11122), so either: a) the user has to provide that array again for us to subtract the additional fee correctly; or b) the extra fee is paid entirely from change - If the previous transaction confirms, rather than the new one, the user has to figure this out and manually craft a new transaction