From 254baa19f3de108a9b764e2fe6d970c838b6fa63 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 19 Feb 2016 02:06:11 +0000 Subject: [PATCH] fixes for go-rpc unix socket updates --- rpc/core/routes.go | 1 - rpc/test/helpers.go | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpc/core/routes.go b/rpc/core/routes.go index 5379985d8..23cd56163 100644 --- a/rpc/core/routes.go +++ b/rpc/core/routes.go @@ -6,7 +6,6 @@ import ( ctypes "github.com/tendermint/tendermint/rpc/core/types" ) -// TODO: eliminate redundancy between here and reading code from core/ var Routes = map[string]*rpc.RPCFunc{ "subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"), "unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"), diff --git a/rpc/test/helpers.go b/rpc/test/helpers.go index 904fa00e1..628e485a9 100644 --- a/rpc/test/helpers.go +++ b/rpc/test/helpers.go @@ -23,7 +23,7 @@ var ( chainID string - rpcAddr, requestAddr, websocketAddr string + rpcAddr, requestAddr, websocketAddr, websocketEndpoint string clientURI *client.ClientURI clientJSON *client.ClientJSONRPC @@ -33,8 +33,9 @@ var ( func init() { chainID = config.GetString("chain_id") rpcAddr = config.GetString("rpc_laddr") - requestAddr = "http://" + rpcAddr - websocketAddr = "ws://" + rpcAddr + "/websocket" + requestAddr = rpcAddr + websocketAddr = rpcAddr + websocketEndpoint = "/websocket" clientURI = client.NewClientURI(requestAddr) clientJSON = client.NewClientJSONRPC(requestAddr) @@ -71,7 +72,7 @@ func newNode(ready chan struct{}) { // create a new connection func newWSClient(t *testing.T) *client.WSClient { - wsc := client.NewWSClient(websocketAddr) + wsc := client.NewWSClient(websocketAddr, websocketEndpoint) if _, err := wsc.Start(); err != nil { t.Fatal(err) }