lnwallet+link: make ChanSyncMsg take channel state as arg

This lets us get the channel reestablish message without creating the LightningChannel struct first.
This commit is contained in:
Johan T. Halseth committed 2018-11-21 10:28:56 +01:00
1 parent 0b9a323fcb
commit 676a1b1407
3 files changed
+32 -29

No files matched your search

+1 -1
View File
@@ -516,7 +516,7 @@ func (l *channelLink) syncChanStates() error {
// First, we'll generate our ChanSync message to send to the other
// side. Based on this message, the remote party will decide if they
// need to retransmit any data or not.
localChanSyncMsg, err := l.channel.ChanSyncMsg()
localChanSyncMsg, err := lnwallet.ChanSyncMsg(l.channel.State())
if err != nil {
return fmt.Errorf("unable to generate chan sync message for "+
"ChannelPoint(%v)", l.channel.ChannelPoint())