Skip to content

Commit

Permalink
lnwallet/chancloser: enable custom payer for rbf coop close
Browse files Browse the repository at this point in the history
In this commit, we enable a custom payer for the rbf coop close. This
allows us to ensure that the party that started one side of the close
flow pays the fees.
  • Loading branch information
Roasbeef committed Dec 10, 2024
1 parent 16d5d97 commit fb1e4b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lnwallet/chancloser/rbf_coop_transitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ func (l *LocalCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
rawSig, closeTx, closeBalance, err := env.CloseSigner.CreateCloseProposal( //nolint:ll
absoluteFee, localScript, l.RemoteDeliveryScript,
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
lnwallet.WithCustomPayer(lntypes.Local),
)
if err != nil {
return nil, err
Expand Down Expand Up @@ -808,6 +809,7 @@ func (l *LocalOfferSent) ProcessEvent(event ProtocolEvent, env *Environment,
localSig, remoteSig, l.LocalDeliveryScript,
l.RemoteDeliveryScript, l.ProposedFee,
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
lnwallet.WithCustomPayer(lntypes.Local),
)
if err != nil {
return nil, err
Expand Down Expand Up @@ -904,6 +906,7 @@ func (l *RemoteCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
chanOpts := []lnwallet.ChanCloseOpt{
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
lnwallet.WithCustomLockTime(msg.SigMsg.LockTime),
lnwallet.WithCustomPayer(lntypes.Remote),
}

chancloserLog.Infof("responding to close w/ local_addr=%x, "+
Expand Down

0 comments on commit fb1e4b3

Please sign in to comment.