mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
contractcourt/channel_arbitrator: handle breach channel at startup
Earlier the channel arbitrator would fail to recognize channels pending close that were in the breached state. This lead to the state machine not progressing correctly, and in some cases crashing since we would attempt to force close an already closed channel. A test TestChannelArbitratorForceCloseBreachedChannel is added to exercise one of these scenarios.
This commit is contained in:
@@ -357,6 +357,9 @@ func (c *ChannelArbitrator) Start() error {
|
||||
case channeldb.CooperativeClose:
|
||||
trigger = coopCloseTrigger
|
||||
|
||||
case channeldb.BreachClose:
|
||||
trigger = breachCloseTrigger
|
||||
|
||||
case channeldb.LocalForceClose:
|
||||
trigger = localCloseTrigger
|
||||
|
||||
|
Reference in New Issue
Block a user