From 95875c55fc7cf94a5e1213f1ed720f3b2ca4f3b5 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 18 Sep 2017 12:04:05 -0700 Subject: [PATCH] ID must be present in both request and response from the spec: This member is REQUIRED. It MUST be the same as the value of the id member in the Request Object. If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null. --- rpc/lib/types/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/lib/types/types.go b/rpc/lib/types/types.go index 8d71d6f2..0267c529 100644 --- a/rpc/lib/types/types.go +++ b/rpc/lib/types/types.go @@ -62,7 +62,7 @@ type RPCError struct { type RPCResponse struct { JSONRPC string `json:"jsonrpc"` - ID string `json:"id,omitempty"` + ID string `json:"id"` Result *json.RawMessage `json:"result,omitempty"` Error *RPCError `json:"error,omitempty"` }