mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 22:57:22 +00:00
fix tests
This commit is contained in:
+6
-6
@@ -59,31 +59,31 @@ func GetConfig() *cfg.Config {
|
||||
// and we use random ports to run in parallel
|
||||
tm, rpc, grpc := makeAddrs()
|
||||
config.P2P.ListenAddress = tm
|
||||
config.RPCListenAddress = rpc
|
||||
config.GRPCListenAddress = grpc
|
||||
config.RPC.ListenAddress = rpc
|
||||
config.RPC.GRPCListenAddress = grpc
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
// GetURIClient gets a uri client pointing to the test tendermint rpc
|
||||
func GetURIClient() *client.URIClient {
|
||||
rpcAddr := GetConfig().RPCListenAddress
|
||||
rpcAddr := GetConfig().RPC.ListenAddress
|
||||
return client.NewURIClient(rpcAddr)
|
||||
}
|
||||
|
||||
// GetJSONClient gets a http/json client pointing to the test tendermint rpc
|
||||
func GetJSONClient() *client.JSONRPCClient {
|
||||
rpcAddr := GetConfig().RPCListenAddress
|
||||
rpcAddr := GetConfig().RPC.ListenAddress
|
||||
return client.NewJSONRPCClient(rpcAddr)
|
||||
}
|
||||
|
||||
func GetGRPCClient() core_grpc.BroadcastAPIClient {
|
||||
grpcAddr := config.GRPCListenAddress
|
||||
grpcAddr := config.RPC.GRPCListenAddress
|
||||
return core_grpc.StartGRPCClient(grpcAddr)
|
||||
}
|
||||
|
||||
func GetWSClient() *client.WSClient {
|
||||
rpcAddr := GetConfig().RPCListenAddress
|
||||
rpcAddr := GetConfig().RPC.ListenAddress
|
||||
wsc := client.NewWSClient(rpcAddr, "/websocket")
|
||||
if _, err := wsc.Start(); err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user