-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Currently the BumpFee
rpc can be used to bump the fee of an unconfirmed transaction through CPFP.
It is however not straight-forward to do this because the caller needs to specify a fee rate that takes into account all unconfirmed parents of the sweep transaction. This seems to be impossible for the caller, because they don't know how their sweep request is going to be grouped with other inputs that may or may not have unconfirmed parents. Even the weight of the sweep transaction itself isn't known to the caller in advance.
It would be better if BumpFee
detects that the input to sweep is still unconfirmed (or even has a chain of unconfirmed parents) and submits it to the sweeper subsystem with the appropriate parent info set. The sweeper already contains logic to take those unconfirmed parents into account during fee calculation.
In case the input transaction confirms on its own, it is probably desirable that the sweeper is aware of this. There is no need anymore to pay for the parent and the absolute fee on the sweep tx can be decreased.