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
@@ -5089,9 +5089,7 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, signer input.Si
}
// Attempt to add a channel sync message to the close summary.
chanSync, err := chanState.ChanSyncMsg(
chanState.HasChanStatus(channeldb.ChanStatusRestored),
)
chanSync, err := chanState.ChanSyncMsg()
if err != nil {
walletLog.Errorf("ChannelPoint(%v): unable to create channel sync "+
"message: %v", chanState.FundingOutpoint, err)