channeldb+lnwallet: don't pass isRestoredChan to ChanSyncMsg

Since we have access to the internal state of the channel, we can
instead get it directly instead of passing it in as a parameter.
This commit is contained in:
Johan T. Halseth committed 2019-09-25 14:04:44 +02:00
1 parent c90b1dd17d
commit 2a6ad6e634
6 files changed
+32 -45

No files matched your search

+1 -3
View File
@@ -609,9 +609,7 @@ func (l *channelLink) syncChanStates() error {
// side. Based on this message, the remote party will decide if they
// need to retransmit any data or not.
chanState := l.channel.State()
localChanSyncMsg, err := chanState.ChanSyncMsg(
chanState.HasChanStatus(channeldb.ChanStatusRestored),
)
localChanSyncMsg, err := chanState.ChanSyncMsg()
if err != nil {
return fmt.Errorf("unable to generate chan sync message for "+
"ChannelPoint(%v)", l.channel.ChannelPoint())