rpc: wait for rpc servers to be available in tests

This commit is contained in:
Ethan Buchman
2017-11-14 21:51:49 +00:00
parent 30f675aafa
commit 194712fd3b
4 changed files with 124 additions and 26 deletions

View File

@ -10,6 +10,11 @@ import (
type broadcastAPI struct {
}
func (bapi *broadcastAPI) Ping(ctx context.Context, req *RequestPing) (*ResponsePing, error) {
// dummy so we can check if the server is up
return &ResponsePing{}, nil
}
func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcastTx) (*ResponseBroadcastTx, error) {
res, err := core.BroadcastTxCommit(req.Tx)
if err != nil {