Codebase list golang-github-go-kit-kit / b1d0a5d
Add Version to JSON-RPC client request (#990) Arkady authored 3 years ago GitHub committed 3 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
163163 return nil, err
164164 }
165165 rpcReq := clientRequest{
166 JSONRPC: "",
166 JSONRPC: Version,
167167 Method: c.method,
168168 Params: params,
169169 ID: c.requestID.Generate(),
132132 if id, _ := requestAtServer.ID.Int(); id != wantID {
133133 t.Fatalf("Request ID at server: want=%d, got=%d", wantID, id)
134134 }
135 if requestAtServer.JSONRPC != jsonrpc.Version {
136 t.Fatalf("JSON-RPC version at server: want=%s, got=%s", jsonrpc.Version, requestAtServer.JSONRPC)
137 }
135138
136139 var paramsAtServer addRequest
137140 err = json.Unmarshal(requestAtServer.Params, &paramsAtServer)