Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
sweep: allow force sweeping of negatively yielding inputs #3809
This PR adds force sweep functionality to the sweeper. Force sweep signals that an input needs to be swept even if its yield is negative. This is useful in CPFP scenarios where the parent tx output is only small. This will be common in the upcoming new anchor outputs commitment format.
The force flag is exposed on the
With an input of that size, the idea is to modify the sweep fee rate to a lower value using the
Note that the sweeper uses fee rate buckets to batch inputs together. The first bucket is 1-10 sat/byte. The actual sweep fee rate is the average of all inputs in a bucket. If your input is the only input in the 1-10 bucket and you've lowered the input fee rate preference to 1 sat/b, it should be swept at that rate.
This PR is not adding anything to that. It mainly allows negatively yielding inputs to be swept using the force flag, but for that you also need a wallet utxo.
…eeps Previously only the fee rate used for the last sweep (the sweep bucket average) was reported. This commit adds the request fee preference to the report, which is used to select a bucket and the sweep tx fee rate.