mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 01:11:32 +00:00
fixes for go-rpc unix socket updates
This commit is contained in:
@ -6,7 +6,6 @@ import (
|
|||||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: eliminate redundancy between here and reading code from core/
|
|
||||||
var Routes = map[string]*rpc.RPCFunc{
|
var Routes = map[string]*rpc.RPCFunc{
|
||||||
"subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"),
|
"subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"),
|
||||||
"unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"),
|
"unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"),
|
||||||
|
@ -23,7 +23,7 @@ var (
|
|||||||
|
|
||||||
chainID string
|
chainID string
|
||||||
|
|
||||||
rpcAddr, requestAddr, websocketAddr string
|
rpcAddr, requestAddr, websocketAddr, websocketEndpoint string
|
||||||
|
|
||||||
clientURI *client.ClientURI
|
clientURI *client.ClientURI
|
||||||
clientJSON *client.ClientJSONRPC
|
clientJSON *client.ClientJSONRPC
|
||||||
@ -33,8 +33,9 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
chainID = config.GetString("chain_id")
|
chainID = config.GetString("chain_id")
|
||||||
rpcAddr = config.GetString("rpc_laddr")
|
rpcAddr = config.GetString("rpc_laddr")
|
||||||
requestAddr = "http://" + rpcAddr
|
requestAddr = rpcAddr
|
||||||
websocketAddr = "ws://" + rpcAddr + "/websocket"
|
websocketAddr = rpcAddr
|
||||||
|
websocketEndpoint = "/websocket"
|
||||||
|
|
||||||
clientURI = client.NewClientURI(requestAddr)
|
clientURI = client.NewClientURI(requestAddr)
|
||||||
clientJSON = client.NewClientJSONRPC(requestAddr)
|
clientJSON = client.NewClientJSONRPC(requestAddr)
|
||||||
@ -71,7 +72,7 @@ func newNode(ready chan struct{}) {
|
|||||||
|
|
||||||
// create a new connection
|
// create a new connection
|
||||||
func newWSClient(t *testing.T) *client.WSClient {
|
func newWSClient(t *testing.T) *client.WSClient {
|
||||||
wsc := client.NewWSClient(websocketAddr)
|
wsc := client.NewWSClient(websocketAddr, websocketEndpoint)
|
||||||
if _, err := wsc.Start(); err != nil {
|
if _, err := wsc.Start(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user