File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -278,3 +278,20 @@ func (dc *DynCommit) Decode(r io.Reader, _ uint32) error {
278278func (dc * DynCommit ) MsgType () MessageType {
279279 return MsgDynCommit
280280}
281+
282+ // NegotiateDynCommit constructs a DynCommit message from the prior DynPropose
283+ // and DynAck messages exchanged during the negotiation.
284+ func NegotiateDynCommit (propose DynPropose , ack DynAck ) DynCommit {
285+ return DynCommit {
286+ ChanID : propose .ChanID ,
287+ Sig : ack .Sig ,
288+ DustLimit : propose .DustLimit ,
289+ MaxValueInFlight : propose .MaxValueInFlight ,
290+ ChannelReserve : propose .ChannelReserve ,
291+ CsvDelay : propose .CsvDelay ,
292+ MaxAcceptedHTLCs : propose .MaxAcceptedHTLCs ,
293+ FundingKey : propose .FundingKey ,
294+ ChannelType : propose .ChannelType ,
295+ KickoffFeerate : propose .KickoffFeerate ,
296+ }
297+ }
You can’t perform that action at this time.
0 commit comments