Skip to content

Commit

Permalink
Call idGenerator when sending a RPC call
Browse files Browse the repository at this point in the history
  • Loading branch information
majecty committed Sep 27, 2019
1 parent b1dd98d commit f71572d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (client *rpcClient) call(option callInterface, params ...interface{}) Resul
}
}()

reqBodyMap := map[string]interface{}{"jsonrpc": "2.0", "method": option.method, "params": params, "id": ""}
reqBodyMap := map[string]interface{}{"jsonrpc": "2.0", "method": option.method, "params": params, "id": client.idGenerator()}
reqBodyJSON, _ := json.Marshal(reqBodyMap)
reqBody := bytes.NewBuffer(reqBodyJSON)
req, err := http.NewRequest("POST", client.rpcURL, reqBody)
Expand Down

0 comments on commit f71572d

Please # to comment.