multi: thread through the new max fee field for co-op close
In this commit, we parse the new max fee field, and pass it through the switch, all the way to the peer where it's ultimately passed into the chan closer state machine.
This commit is contained in:
4 files changed
+20
-3
No files matched your search
@@ -2697,6 +2697,12 @@ func (p *Brontide) createChanCloser(channel *lnwallet.LightningChannel,
|
||||
return nil, fmt.Errorf("cannot obtain best block")
|
||||
}
|
||||
|
||||
// The req will only be set if we initaited the co-op closing flow.
|
||||
var maxFee chainfee.SatPerKWeight
|
||||
if req != nil {
|
||||
maxFee = req.MaxFee
|
||||
}
|
||||
|
||||
chanCloser := chancloser.NewChanCloser(
|
||||
chancloser.ChanCloseCfg{
|
||||
Channel: channel,
|
||||
@@ -2706,6 +2712,7 @@ func (p *Brontide) createChanCloser(channel *lnwallet.LightningChannel,
|
||||
op, false,
|
||||
)
|
||||
},
|
||||
MaxFee: maxFee,
|
||||
Disconnect: func() error {
|
||||
return p.cfg.DisconnectPeer(p.IdentityKey())
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user