mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-23 12:13:50 +02:00
channeldb: set restored chan status within RestoreChannelShells
In this commit, we move the location where we restore the channel status to within the `RestoreChannelShells` method itself. Before this commit, we attempted to use `ApplyChanStatus` which creates a DB transaction and relies on a fully populated channel state, which in the restoration case, we don't yet have.
This commit is contained in:
@@ -101,16 +101,6 @@ func (c *chanDBRestorer) openChannelShell(backup chanbackup.Single) (
|
||||
},
|
||||
}
|
||||
|
||||
// TODO(roasbeef): move this mapping elsewhere?
|
||||
|
||||
// When we make a channel, we mark that the channel has been restored,
|
||||
// this will signal to other sub-systems to not attempt to use the
|
||||
// channel as if it was a regular one.
|
||||
chanStatus := channeldb.ChanStatusDefault |
|
||||
channeldb.ChanStatusRestored
|
||||
|
||||
chanShell.Chan.ApplyChanStatus(chanStatus)
|
||||
|
||||
return &chanShell, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user