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.
This commit is contained in:
1 file changed
+3
@@ -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
|
||||
@@ -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
|
||||
@@ -903,6 +905,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, "+
|
||||
|
||||
Reference in new issue
Block a user