mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 22:01:20 +00:00
BROKEN: attempt to replace go-wire.JSON with json.Unmarshall in rpc
This commit is contained in:
@ -8,9 +8,8 @@ import (
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pkg/errors"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
types "github.com/tendermint/tendermint/rpc/lib/types"
|
||||
wire "github.com/tendermint/go-wire"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -157,15 +156,15 @@ func (wsc *WSClient) Unsubscribe(eventid string) error {
|
||||
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
|
||||
}
|
||||
// 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,
|
||||
Params: encodedParams,
|
||||
Params: params,
|
||||
ID: "",
|
||||
})
|
||||
return err
|
||||
|
Reference in New Issue
Block a user