mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
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:
@@ -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