broadcast_tx via grpc

This commit is contained in:
Ethan Buchman
2016-06-21 13:19:49 -04:00
parent 538a50c9e8
commit db437e7a45
13 changed files with 573 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import (
"github.com/tendermint/tendermint/config/tendermint_test"
nm "github.com/tendermint/tendermint/node"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/rpc/grpc"
)
// global variables for use across all tests
@ -24,8 +25,10 @@ var (
requestAddr string
websocketAddr string
websocketEndpoint string
grpcAddr string
clientURI *client.ClientURI
clientJSON *client.ClientJSONRPC
clientGRPC core_grpc.BroadcastAPIClient
)
// initialize config and create new node
@ -33,12 +36,14 @@ func init() {
config = tendermint_test.ResetConfig("rpc_test_client_test")
chainID = config.GetString("chain_id")
rpcAddr = config.GetString("rpc_laddr")
grpcAddr = config.GetString("grpc_laddr")
requestAddr = rpcAddr
websocketAddr = rpcAddr
websocketEndpoint = "/websocket"
clientURI = client.NewClientURI(requestAddr)
clientJSON = client.NewClientJSONRPC(requestAddr)
clientGRPC = core_grpc.StartGRPCClient(grpcAddr)
// TODO: change consensus/state.go timeouts to be shorter
@ -59,6 +64,8 @@ func newNode(ready chan struct{}) {
// Run the RPC server.
node.StartRPC()
time.Sleep(time.Second)
ready <- struct{}{}
// Sleep forever