sweep: make sweeper aware of unconfirmed parent transactions.

Extend the fee estimator to take into account parent transactions with
their weights and fees.

Do not try to cpfp parent transactions that have a higher fee rate than
the sweep tx fee rate.
This commit is contained in:
Joost Jager
2020-09-04 11:28:17 +02:00
parent 3e3d8487fb
commit 681496b474
13 changed files with 334 additions and 30 deletions

View File

@@ -99,6 +99,7 @@ func (c *anchorResolver) Resolve() (ContractResolver, error) {
input.CommitmentAnchor,
&c.anchorSignDescriptor,
c.broadcastHeight,
nil,
)
resultChan, err := c.Sweeper.SweepInput(

View File

@@ -1073,6 +1073,7 @@ func (c *ChannelArbitrator) sweepAnchors(anchors []*lnwallet.AnchorResolution,
input.CommitmentAnchor,
&anchor.AnchorSignDescriptor,
heightHint,
nil,
)
// Sweep anchor output with the minimum fee rate. This usually