mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 01:33:02 +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
27b24ab86a
commit
835d7623d4
@ -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…
x
Reference in New Issue
Block a user