diff options
author | Felix Lange <fjl@twurst.com> | 2016-01-27 01:18:56 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-01-27 07:06:37 +0800 |
commit | 5728dd381d344e8e8fca2df06be0ab7330980b66 (patch) | |
tree | cd0c04c60553d091350bd8a2d179cc800bc56d9e /rpc | |
parent | 63e76482ac0021afc80b504046c058b8d96891b2 (diff) | |
download | dexon-5728dd381d344e8e8fca2df06be0ab7330980b66.tar.gz dexon-5728dd381d344e8e8fca2df06be0ab7330980b66.tar.zst dexon-5728dd381d344e8e8fca2df06be0ab7330980b66.zip |
rpc: fix success response encoding for null return value
The "result" field of JSON-RPC 2.0 responses was omitted
if the result was nil, causing exceptions in web3.js.
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/json.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/json.go b/rpc/json.go index 8bdb4665d..02bc71c26 100644 --- a/rpc/json.go +++ b/rpc/json.go @@ -48,7 +48,7 @@ type JSONRequest struct { type JSONSuccessResponse struct { Version string `json:"jsonrpc"` Id int64 `json:"id"` - Result interface{} `json:"result,omitempty"` + Result interface{} `json:"result"` } // JSON-RPC error object |