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: add wallet inputs to reach dust limit #3814
This PR enables the sweeper to sweep inputs that are positively-yielding, but by itself wouldn't reach the dust limit for the sweep transaction output value at the chosen fee rate.
They way to deal with this is to attach additional wallet input(s) to bring up the output value of the transaction.
This is a preparation for sweeping anchor outputs that are too small to reach the dust limit of the sweep tx output.
There are also a few commits in this PR that aren't strictly necessary for the functionality that this PR adds, but are included anyway to prevent touching the code again in the follow-up.
Next step after this PR is to add forced sweeping of negatively yielding inputs.
A refactoring that introduces no functional changes. This prepares for the addition of wallet utxos to push the sweep tx above the dust limit. It also enabled access to input-specific sweep parameters during tx generation. This will be used in later commits to control the sweep process.
We need access to additional wallet functionality. This commit creates an interface to prevent passing in multiple function pointers.
This commit allows sweeper to sweep inputs that on its own are not able to form a sweep transaction that meets the dust limit. This functionality is useful for sweeping small outputs. In the future, this will be particularly important to sweep anchors. Anchors will typically be spent with a relatively large fee to pay for the parent tx. It will then be necessary to attach an additional wallet utxo.