mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
contractcourt: remove the existing ManuallyResolveChannel methiod
We’re removing this method as it’s no longer needed, since the chainWatcher will properly handle on-chain co-op closes.
This commit is contained in:
parent
3ec83cc82f
commit
db2b9fd9ff
@ -606,31 +606,10 @@ func (c *ChainArbitrator) WatchNewChannel(newChan *channeldb.OpenChannel) error
|
||||
return channelArb.Start()
|
||||
}
|
||||
|
||||
// ManuallyResolveChannel is a method to be called by outside sub-systems if a
|
||||
// channel becomes fully resolved, but due to manual intervention. An example
|
||||
// of such a manual intervention includes a cooperative channel closuer.
|
||||
//
|
||||
// TODO(roasbeef): remove after arbs watch chain for all actions directly
|
||||
func (c *ChainArbitrator) ManuallyResolveChannel(chanPoint wire.OutPoint) error {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
log.Infof("Manually resolving ChannelArbitrator for ChannelPoint(%v)",
|
||||
chanPoint)
|
||||
|
||||
channelArb, ok := c.activeChannels[chanPoint]
|
||||
if !ok {
|
||||
return fmt.Errorf("unable to find arbitrator for: %v", chanPoint)
|
||||
}
|
||||
|
||||
if err := channelArb.Stop(); err != nil {
|
||||
if err := channelArb.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
delete(c.activeChannels, chanPoint)
|
||||
|
||||
return channelArb.log.WipeHistory()
|
||||
return chainWatcher.Start()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user