Skip to content

Commit 3c5f96d

Browse files
committed
lnwallet/chancloser: enable custom payer for rbf coop close
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.
1 parent d38c5e6 commit 3c5f96d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lnwallet/chancloser/rbf_coop_transitions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ func (l *LocalCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
661661
rawSig, closeTx, closeBalance, err := env.CloseSigner.CreateCloseProposal( //nolint:ll
662662
absoluteFee, localScript, l.RemoteDeliveryScript,
663663
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
664+
lnwallet.WithCustomPayer(lntypes.Local),
664665
)
665666
if err != nil {
666667
return nil, err
@@ -808,6 +809,7 @@ func (l *LocalOfferSent) ProcessEvent(event ProtocolEvent, env *Environment,
808809
localSig, remoteSig, l.LocalDeliveryScript,
809810
l.RemoteDeliveryScript, l.ProposedFee,
810811
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
812+
lnwallet.WithCustomPayer(lntypes.Local),
811813
)
812814
if err != nil {
813815
return nil, err
@@ -903,6 +905,7 @@ func (l *RemoteCloseStart) ProcessEvent(event ProtocolEvent, env *Environment,
903905
chanOpts := []lnwallet.ChanCloseOpt{
904906
lnwallet.WithCustomSequence(mempool.MaxRBFSequence),
905907
lnwallet.WithCustomLockTime(msg.SigMsg.LockTime),
908+
lnwallet.WithCustomPayer(lntypes.Remote),
906909
}
907910

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

0 commit comments

Comments
 (0)