From f71572d862b565af9132cc6f238c19565ddf9d03 Mon Sep 17 00:00:00 2001 From: Park Juhyung Date: Mon, 16 Sep 2019 18:44:21 +0900 Subject: [PATCH] Call idGenerator when sending a RPC call --- base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.go b/base.go index bc0f121..d008052 100644 --- a/base.go +++ b/base.go @@ -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)