mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 19:16:56 +01:00
lnwallet/chancloser: ignore spurious channel flushed events
If we go to close while the channel is already flushed, we might get an extra event, so we can safely ignore it and do a self state transition.
This commit is contained in:
parent
73e622a31e
commit
7fc62840de
1 changed files with 6 additions and 0 deletions
|
@ -582,6 +582,12 @@ func (c *ClosingNegotiation) ProcessEvent(event ProtocolEvent, env *Environment,
|
|||
// we receive a confirmation event, or we receive a signal to restart
|
||||
// the co-op close process.
|
||||
switch msg := event.(type) {
|
||||
// Ignore any potential duplicate channel flushed events.
|
||||
case *ChannelFlushed:
|
||||
return &CloseStateTransition{
|
||||
NextState: c,
|
||||
}, nil
|
||||
|
||||
// If we get a confirmation, then the spend request we issued when we
|
||||
// were leaving the ChannelFlushing state has been confirmed. We'll
|
||||
// now transition to the StateFin state.
|
||||
|
|
Loading…
Add table
Reference in a new issue