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.
This commit is contained in:
Joost Jager
2019-11-25 13:17:44 +01:00
parent d84b596f55
commit ea397c9d6e
5 changed files with 282 additions and 6 deletions

View File

@@ -56,4 +56,12 @@ type UtxoSweeper interface {
// RelayFeePerKW returns the minimum fee rate required for transactions
// to be relayed.
RelayFeePerKW() chainfee.SatPerKWeight
// UpdateParams allows updating the sweep parameters of a pending input
// in the UtxoSweeper. This function can be used to provide an updated
// fee preference that will be used for a new sweep transaction of the
// input that will act as a replacement transaction (RBF) of the
// original sweeping transaction, if any.
UpdateParams(input wire.OutPoint, params sweep.ParamsUpdate) (
chan sweep.Result, error)
}