Commit Graph

5 Commits

Author SHA1 Message Date
Joost Jager
6df4fa84df
sweep: clean up state mutation
The add function tries to add an input to the current set. It therefore
calculates what the new set would look like before actually adding. This
commit isolates the state of the tentative set so that there is less
opportunity for bugs to creep in.
2020-09-16 08:17:38 +02:00
Joost Jager
b0aae13d70
sweep: allow force sweeps 2020-01-15 16:56:44 +01:00
Joost Jager
14237f5fd4
sweep: create add constraints
This refactor prepares for the addition of specific constraints for
force sweep inputs.
2020-01-15 16:56:42 +01:00
Joost Jager
e01600fdb8
sweep: add wallet inputs to reach dust limit
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.
2019-12-17 22:00:39 +01:00
Joost Jager
b325aae4f2
sweep: extract positive input set struct
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.
2019-12-17 22:00:34 +01:00