some cleanup from review

This commit is contained in:
Ethan Buchman
2017-04-28 23:18:38 -04:00
parent 297772e009
commit efeadcc0f4
8 changed files with 6 additions and 131 deletions

View File

@ -67,13 +67,6 @@ func NewJSONRPCClient(remote string) *JSONRPCClient {
}
func (c *JSONRPCClient) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) {
// we need this step because we attempt to decode values using `go-wire`
// (handlers.go:176) on the server side
// encodedParams := make(map[string]interface{})
// for k, v := range params {
// bytes := json.RawMessage(wire.JSONBytes(v))
// encodedParams[k] = &bytes
// }
request := types.RPCRequest{
JSONRPC: "2.0",
Method: method,

View File

@ -154,13 +154,6 @@ func (wsc *WSClient) Unsubscribe(eventid string) error {
// Call asynchronously calls a given method by sending an RPCRequest to the
// server. Results will be available on ResultsCh, errors, if any, on ErrorsCh.
func (wsc *WSClient) Call(method string, params map[string]interface{}) error {
// we need this step because we attempt to decode values using `go-wire`
// (handlers.go:470) on the server side
// encodedParams := make(map[string]interface{})
// for k, v := range params {
// bytes := json.RawMessage(wire.JSONBytes(v))
// encodedParams[k] = &bytes
// }
err := wsc.WriteJSON(types.RPCRequest{
JSONRPC: "2.0",
Method: method,