diff --git a/contractcourt/htlc_timeout_resolver.go b/contractcourt/htlc_timeout_resolver.go index 095e538e4..0b3e8688d 100644 --- a/contractcourt/htlc_timeout_resolver.go +++ b/contractcourt/htlc_timeout_resolver.go @@ -327,6 +327,7 @@ func (h *htlcTimeoutResolver) sweepSecondLevelTx() error { Fee: sweep.FeePreference{ ConfTarget: secondLevelConfTarget, }, + Force: true, }, ) diff --git a/contractcourt/utxonursery.go b/contractcourt/utxonursery.go index 08b4a32be..3776a3546 100644 --- a/contractcourt/utxonursery.go +++ b/contractcourt/utxonursery.go @@ -781,9 +781,10 @@ func (u *UtxoNursery) sweepMatureOutputs(classHeight uint32, // passed in with disastrous consequences. local := output - resultChan, err := u.cfg.SweepInput( - &local, sweep.Params{Fee: feePref}, - ) + resultChan, err := u.cfg.SweepInput(&local, sweep.Params{ + Fee: feePref, + Force: true, + }) if err != nil { return err } diff --git a/docs/release-notes/release-notes-0.16.3.md b/docs/release-notes/release-notes-0.16.3.md index b5ca8ab71..4f9a07435 100644 --- a/docs/release-notes/release-notes-0.16.3.md +++ b/docs/release-notes/release-notes-0.16.3.md @@ -20,6 +20,14 @@ peer, then this'll force a reconnect, which may restart things and help avoid certain force close scenarios. + +## Consistent Contract Resolution + +* If lnd decides to go to chain for an HTLC, it will now _always_ ensure the + HTLC is fully swept on the outgoing link. Prior logic would avoid sweeping + due to negative yield, but combined with other inputs, the HTLC will usually + be positive yield. + # Contributors (Alphabetical Order) * Elle Mouton