Skip to content

Commit

Permalink
RPC id param must be int, not a string
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy007 committed Dec 14, 2015
1 parent 281249f commit 8b1b829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (r *RPCClient) SubmitHashrate(params interface{}) (bool, error) {
}

func (r *RPCClient) doPost(url, method string, params interface{}) (JSONRpcResp, error) {
jsonReq := map[string]interface{}{"jsonrpc": "2.0", "id": "0", "method": method, "params": params}
jsonReq := map[string]interface{}{"jsonrpc": "2.0", "id": 0, "method": method, "params": params}
data, _ := json.Marshal(jsonReq)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
req.Header.Set("Content-Length", (string)(len(data)))
Expand Down

0 comments on commit 8b1b829

Please sign in to comment.