fixes from review
This commit is contained in:
parent
d82c7edf3a
commit
5dabeffb35
|
@ -27,11 +27,10 @@ func TestChainAware(t *testing.T) {
|
|||
|
||||
// Connect to the socket
|
||||
client := abcicli.NewSocketClient("unix://test.sock", false)
|
||||
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
|
||||
if _, err := client.Start(); err != nil {
|
||||
t.Fatalf("Error starting socket client: %v", err.Error())
|
||||
}
|
||||
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
|
||||
client.Start()
|
||||
defer client.Stop()
|
||||
|
||||
n := uint64(5)
|
||||
|
|
|
@ -39,19 +39,18 @@ func testStream(t *testing.T, app types.Application) {
|
|||
|
||||
// Start the listener
|
||||
server := server.NewSocketServer("unix://test.sock", app)
|
||||
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
|
||||
if _, err := server.Start(); err != nil {
|
||||
t.Fatalf("Error starting socket server: %v", err.Error())
|
||||
}
|
||||
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
|
||||
defer server.Stop()
|
||||
|
||||
// Connect to the socket
|
||||
client := abcicli.NewSocketClient("unix://test.sock", false)
|
||||
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
|
||||
if _, err := client.Start(); err != nil {
|
||||
t.Fatalf("Error starting socket client: %v", err.Error())
|
||||
}
|
||||
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
|
||||
client.Start()
|
||||
defer client.Stop()
|
||||
|
||||
done := make(chan struct{})
|
||||
|
@ -113,10 +112,10 @@ func testGRPCSync(t *testing.T, app *types.GRPCApplication) {
|
|||
|
||||
// Start the listener
|
||||
server := server.NewGRPCServer("unix://test.sock", app)
|
||||
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
|
||||
if _, err := server.Start(); err != nil {
|
||||
t.Fatalf("Error starting GRPC server: %v", err.Error())
|
||||
}
|
||||
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
|
||||
defer server.Stop()
|
||||
|
||||
// Connect to the socket
|
||||
|
|
|
@ -38,12 +38,12 @@ func startClient(abciType string) abcicli.Client {
|
|||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
client.SetLogger(logger.With("module", "abcicli"))
|
||||
if _, err := client.Start(); err != nil {
|
||||
panic("connecting to abci_app: " + err.Error())
|
||||
}
|
||||
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
client.SetLogger(logger.With("module", "abcicli"))
|
||||
return client
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
|
||||
"github.com/tendermint/go-wire/data"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
)
|
||||
|
||||
// validators implements sort
|
||||
|
@ -38,6 +39,9 @@ func ValidatorsString(vs Validators) string {
|
|||
for i, v := range vs {
|
||||
s[i] = validatorPretty{v.PubKey, v.Power}
|
||||
}
|
||||
b, _ := json.Marshal(s)
|
||||
b, err := json.Marshal(s)
|
||||
if err != nil {
|
||||
cmn.PanicSanity(err.Error())
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue