Commit Graph

5 Commits

Author SHA1 Message Date
Joost Jager
ea397c9d6e cnct: resolve anchors post-confirmation
Sweeping anchors and being able to bump the fee was already added in a
previous commit. This commit extends anchor sweeping with an anchor
resolver object that becomes active after the commitment tx confirms.
At that point, the anchors do not serve the purpose of getting the
commitment tranaction confirmed anymore. It is however still possible to
reclaim some of their value if using a low fee rate.
2020-03-18 12:27:01 +01:00
Joost Jager
3b517390d8 cnct+sweeper: give contract court access to relay fee
Relay fee is needed later to sweep anchors at the minimum fee rate.
2020-03-17 16:25:37 +01:00
Johan T. Halseth
1f28bd8086 contractcourt/commit_sweep_resolver: set sweep witness type based on witness script
We use the fact that we can tell whether the commit is local or remote
by inspecting the witness script. We cannot use the maturity delay
anymore, as we can have delayed to_remote outputs also now.

Co-authored-by: Joost Jager <joost.jager@gmail.com>
2020-03-09 12:10:59 +01:00
Joost Jager
38adfd7ecc sweep: create sweep parameters struct
Prepares for adding more input-specific sweep parameters.
2019-12-13 12:02:42 +01:00
Joost Jager
462d86d0bb cnct/test: add unit test for commit sweep resolver 2019-11-14 13:38:06 +01:00