diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-18 04:27:34 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-18 04:27:34 +0800 |
commit | 917050dc30d8717d7e0bba1257165c1aec44887f (patch) | |
tree | 712f8823391286438a0e5c3d1f53c4682254650e /rpc/http.go | |
parent | fe819f3b9f7a2d8d842c53b7269ccceace533569 (diff) | |
parent | 53104b09fa823cb5457960b8518b9650a5b083da (diff) | |
download | go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar.gz go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar.bz2 go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar.lz go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar.xz go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.tar.zst go-tangerine-917050dc30d8717d7e0bba1257165c1aec44887f.zip |
Merge branch 'develop' into rpcfrontier
Diffstat (limited to 'rpc/http.go')
-rw-r--r-- | rpc/http.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rpc/http.go b/rpc/http.go index 8dcd55ad1..b6edb7cd7 100644 --- a/rpc/http.go +++ b/rpc/http.go @@ -26,7 +26,7 @@ func JSONRPC(pipe *xeth.XEth, dataDir string) http.Handler { if req.ContentLength > maxSizeReqLength { jsonerr := &RpcErrorObject{-32700, "Request too large"} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: nil, Error: jsonerr}) return } @@ -36,11 +36,11 @@ func JSONRPC(pipe *xeth.XEth, dataDir string) http.Handler { break case *DecodeParamError, *InsufficientParamsError, *ValidationError: jsonerr := &RpcErrorObject{-32602, reqerr.Error()} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: nil, Error: jsonerr}) return default: jsonerr := &RpcErrorObject{-32700, "Could not parse request"} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: nil, Error: jsonerr}) return } @@ -51,19 +51,19 @@ func JSONRPC(pipe *xeth.XEth, dataDir string) http.Handler { break case *NotImplementedError: jsonerr := &RpcErrorObject{-32601, reserr.Error()} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: reqParsed.ID, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: reqParsed.Id, Error: jsonerr}) return case *DecodeParamError, *InsufficientParamsError, *ValidationError: jsonerr := &RpcErrorObject{-32602, reserr.Error()} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: reqParsed.ID, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: reqParsed.Id, Error: jsonerr}) return default: jsonerr := &RpcErrorObject{-32603, reserr.Error()} - json.Send(w, &RpcErrorResponse{JsonRpc: jsonrpcver, ID: reqParsed.ID, Error: jsonerr}) + json.Send(w, &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: reqParsed.Id, Error: jsonerr}) return } rpchttplogger.DebugDetailf("Generated response: %T %s", response, response) - json.Send(w, &RpcSuccessResponse{JsonRpc: jsonrpcver, ID: reqParsed.ID, Result: response}) + json.Send(w, &RpcSuccessResponse{Jsonrpc: jsonrpcver, Id: reqParsed.Id, Result: response}) }) } |