mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
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:
parent
d38c5e6222
commit
3c5f96de7c
@ -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, "+
|
||||
|
Loading…
Reference in New Issue
Block a user