make RPCRequest params not a pointer

https://github.com/tendermint/tendermint/pull/724#issuecomment-335362927
This commit is contained in:
Anton Kaliaev
2017-10-10 13:50:06 +04:00
parent d935a4f0a8
commit aae4e94998
2 changed files with 18 additions and 15 deletions

View File

@ -14,10 +14,10 @@ import (
// REQUEST
type RPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID string `json:"id"`
Method string `json:"method"`
Params *json.RawMessage `json:"params"` // must be map[string]interface{} or []interface{}
JSONRPC string `json:"jsonrpc"`
ID string `json:"id"`
Method string `json:"method"`
Params json.RawMessage `json:"params"` // must be map[string]interface{} or []interface{}
}
func NewRPCRequest(id string, method string, params json.RawMessage) RPCRequest {
@ -25,7 +25,7 @@ func NewRPCRequest(id string, method string, params json.RawMessage) RPCRequest
JSONRPC: "2.0",
ID: id,
Method: method,
Params: &params,
Params: params,
}
}