mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 14:06:45 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user