Fix rpc tests

This commit is contained in:
Jae Kwon
2018-04-05 21:19:14 -07:00
parent c541d58d2f
commit 3ca5292dc9
11 changed files with 160 additions and 121 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"strings"
"time"
"github.com/tendermint/tmlibs/log"
@ -26,11 +27,15 @@ var globalConfig *cfg.Config
func waitForRPC() {
laddr := GetConfig().RPC.ListenAddress
client := rpcclient.NewJSONRPCClient(laddr)
ctypes.RegisterAmino(client.Codec())
result := new(ctypes.ResultStatus)
for {
_, err := client.Call("status", map[string]interface{}{}, result)
if err == nil {
return
} else {
fmt.Println("error", err)
time.Sleep(time.Millisecond)
}
}
}