fix_: remove unreachable code error message (#5845)

This commit is contained in:
richΛrd 2024-09-23 09:12:02 -04:00 committed by GitHub
parent 2f71d9d9f2
commit a84f78f8aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 10 deletions

View File

@ -21,12 +21,10 @@ func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoB
{{ range .}} {{ range .}}
case protobuf.ApplicationMetadataMessage_{{.EnumValue}}: case protobuf.ApplicationMetadataMessage_{{.EnumValue}}:
return m.{{.MethodName}}(messageState, protoBytes, msg, filter{{ if .FromArchiveArg }}, fromArchive{{ end }}) return m.{{.MethodName}}(messageState, protoBytes, msg, filter{{ if .FromArchiveArg }}, fromArchive{{ end }})
{{ end }} {{ end }}
default:
m.logger.Info("protobuf type not found", zap.String("type", string(msg.ApplicationLayer.Type)))
return errors.New("protobuf type not found")
} }
return nil m.logger.Info("protobuf type not found", zap.String("type", string(msg.ApplicationLayer.Type)))
return errors.New("protobuf type not found")
} }
{{ range . }} {{ range . }}

View File

@ -264,12 +264,10 @@ func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoB
case protobuf.ApplicationMetadataMessage_COMMUNITY_SHARED_ADDRESSES_RESPONSE: case protobuf.ApplicationMetadataMessage_COMMUNITY_SHARED_ADDRESSES_RESPONSE:
return m.handleCommunitySharedAddressesResponseProtobuf(messageState, protoBytes, msg, filter) return m.handleCommunitySharedAddressesResponseProtobuf(messageState, protoBytes, msg, filter)
default:
m.logger.Info("protobuf type not found", zap.String("type", string(msg.ApplicationLayer.Type)))
return errors.New("protobuf type not found")
} }
return nil m.logger.Info("protobuf type not found", zap.String("type", string(msg.ApplicationLayer.Type)))
return errors.New("protobuf type not found")
} }