Browse Source

[rpc/client/http] set codec on rpc client

pull/1824/head
Anton Kaliaev 6 years ago
parent
commit
ac12432603
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      rpc/client/httpclient.go

+ 2
- 1
rpc/client/httpclient.go View File

@ -29,12 +29,13 @@ type HTTP struct {
*WSEvents
}
// New takes a remote endpoint in the form tcp://<host>:<port>
// NewHTTP takes a remote endpoint in the form tcp://<host>:<port>
// and the websocket path (which always seems to be "/websocket")
func NewHTTP(remote, wsEndpoint string) *HTTP {
rc := rpcclient.NewJSONRPCClient(remote)
cdc := rc.Codec()
ctypes.RegisterAmino(cdc)
rc.SetCodec(cdc)
return &HTTP{
rpc: rc,


Loading…
Cancel
Save