diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index 64f843fc..9df91993 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -500,11 +500,12 @@ func (s *mockServer) readHandler(message lnwire.Message) error { return fmt.Errorf("unknown message type: %T", msg) } - // Dispatch the commitment update message to the proper - // channel link dedicated to this channel. + // Dispatch the commitment update message to the proper channel link + // dedicated to this channel. If the link is not found, we will discard + // the message. link, err := s.htlcSwitch.GetLink(targetChan) if err != nil { - return err + return nil } // Create goroutine for this, in order to be able to properly stop