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:
6 files changed
+32
-45
No files matched your search
@@ -731,9 +731,7 @@ func (c *chainWatcher) dispatchCooperativeClose(commitSpend *chainntnfs.SpendDet
|
||||
}
|
||||
|
||||
// Attempt to add a channel sync message to the close summary.
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg(
|
||||
c.cfg.chanState.HasChanStatus(channeldb.ChanStatusRestored),
|
||||
)
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg()
|
||||
if err != nil {
|
||||
log.Errorf("ChannelPoint(%v): unable to create channel sync "+
|
||||
"message: %v", c.cfg.chanState.FundingOutpoint, err)
|
||||
@@ -810,9 +808,7 @@ func (c *chainWatcher) dispatchLocalForceClose(
|
||||
}
|
||||
|
||||
// Attempt to add a channel sync message to the close summary.
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg(
|
||||
c.cfg.chanState.HasChanStatus(channeldb.ChanStatusRestored),
|
||||
)
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg()
|
||||
if err != nil {
|
||||
log.Errorf("ChannelPoint(%v): unable to create channel sync "+
|
||||
"message: %v", c.cfg.chanState.FundingOutpoint, err)
|
||||
@@ -996,9 +992,7 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail
|
||||
}
|
||||
|
||||
// Attempt to add a channel sync message to the close summary.
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg(
|
||||
c.cfg.chanState.HasChanStatus(channeldb.ChanStatusRestored),
|
||||
)
|
||||
chanSync, err := c.cfg.chanState.ChanSyncMsg()
|
||||
if err != nil {
|
||||
log.Errorf("ChannelPoint(%v): unable to create channel sync "+
|
||||
"message: %v", c.cfg.chanState.FundingOutpoint, err)
|
||||
|
||||
Reference in new issue
Block a user