diff --git a/rpc/json.go b/rpc/json.go index 56b6ac9503..43ac205058 100644 --- a/rpc/json.go +++ b/rpc/json.go @@ -275,9 +275,8 @@ func parseBatchRequest(incomingMsg json.RawMessage) ([]rpcRequest, bool, Error) func (c *jsonCodec) ParseRequestArguments(argTypes []reflect.Type, params interface{}) ([]reflect.Value, Error) { if args, ok := params.(json.RawMessage); !ok { return nil, &invalidParamsError{"Invalid params supplied"} - } else { - return parsePositionalArguments(args, argTypes) } + return parsePositionalArguments(args, argTypes) } // parsePositionalArguments tries to parse the given args to an array of values with the diff --git a/rpc/server_test.go b/rpc/server_test.go index 90d62f26d8..0f76826084 100644 --- a/rpc/server_test.go +++ b/rpc/server_test.go @@ -59,8 +59,8 @@ func (s *Service) Rets() (string, error) { return "", nil } -func (s *Service) InvalidRets1() (error, string) { - return nil, "" +func (s *Service) InvalidRets1() (string, error) { + return "", nil } func (s *Service) InvalidRets2() (string, string) {