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:
Olaoluwa Osuntokun
2022-07-26 16:41:59 -07:00
parent c791b18cc0
commit 1e556aa189
4 changed files with 20 additions and 3 deletions

View File

@ -2508,9 +2508,12 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
}
}
maxFee := chainfee.SatPerKVByte(
in.MaxFeePerVbyte * 1000,
).FeePerKWeight()
updateChan, errChan = r.server.htlcSwitch.CloseLink(
chanPoint, contractcourt.CloseRegular, feeRate,
deliveryScript,
maxFee, deliveryScript,
)
}
out: