Skip to content
Draft

WIP #21328

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions core/services/gateway/multihandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ func (m *multiHandler) HandleNodeMessage(ctx context.Context, resp *jsonrpc.Resp
}

func (m *multiHandler) getHandler(method string) (handlers.Handler, error) {
// If there's only one handler, return it directly.
// This preserves backwards compatibility for cases where the method
// isn't specified on responses (and for cases where only one handler is registered more generally).
if len(m.typeToHandler) == 1 {
for _, handler := range m.typeToHandler {
return handler, nil
}
}

handler, ok := m.methodToHandler[method]
if !ok {
return nil, errors.New("no handler found for method " + method)
Expand Down
Loading