rpc: myriad little fixes

This commit is contained in:
Ethan Buchman
2015-04-01 05:12:38 -07:00
parent 8cc8757252
commit 8fe1274323
4 changed files with 29 additions and 8 deletions

View File

@ -27,7 +27,7 @@ type RPCResponse struct {
Result interface{} `json:"result"`
Error string `json:"error"`
Id string `json:"id"`
JSONRPC int `json:"jsonrpc"`
JSONRPC string `json:"jsonrpc"`
}
func NewRPCResponse(res interface{}, err string) RPCResponse {
@ -38,7 +38,7 @@ func NewRPCResponse(res interface{}, err string) RPCResponse {
Result: res,
Error: err,
Id: "",
JSONRPC: 2,
JSONRPC: "2.0",
}
}