|
|
@ -3,7 +3,6 @@ package dummy |
|
|
|
import ( |
|
|
|
"bytes" |
|
|
|
"io/ioutil" |
|
|
|
"os" |
|
|
|
"sort" |
|
|
|
"testing" |
|
|
|
|
|
|
@ -213,13 +212,13 @@ func valsEqual(t *testing.T, vals1, vals2 []*types.Validator) { |
|
|
|
func makeSocketClientServer(app types.Application, name string) (abcicli.Client, cmn.Service, error) { |
|
|
|
// Start the listener
|
|
|
|
socket := cmn.Fmt("unix://%s.sock", name) |
|
|
|
logger := log.NewTMLogger(os.Stdout) |
|
|
|
logger := log.TestingLogger() |
|
|
|
|
|
|
|
server, err := server.NewSocketServer(socket, app) |
|
|
|
if err != nil { |
|
|
|
return nil, nil, err |
|
|
|
} |
|
|
|
server.SetLogger(log.With(logger, "module", "abci-server")) |
|
|
|
server.SetLogger(logger.With("module", "abci-server")) |
|
|
|
|
|
|
|
// Connect to the socket
|
|
|
|
client, err := abcicli.NewSocketClient(socket, false) |
|
|
@ -227,7 +226,7 @@ func makeSocketClientServer(app types.Application, name string) (abcicli.Client, |
|
|
|
server.Stop() |
|
|
|
return nil, nil, err |
|
|
|
} |
|
|
|
client.SetLogger(log.With(logger, "module", "abci-client")) |
|
|
|
client.SetLogger(logger.With("module", "abci-client")) |
|
|
|
client.Start() |
|
|
|
|
|
|
|
return client, server, err |
|
|
@ -236,21 +235,21 @@ func makeSocketClientServer(app types.Application, name string) (abcicli.Client, |
|
|
|
func makeGRPCClientServer(app types.Application, name string) (abcicli.Client, cmn.Service, error) { |
|
|
|
// Start the listener
|
|
|
|
socket := cmn.Fmt("unix://%s.sock", name) |
|
|
|
logger := log.NewTMLogger(os.Stdout) |
|
|
|
logger := log.TestingLogger() |
|
|
|
|
|
|
|
gapp := types.NewGRPCApplication(app) |
|
|
|
server, err := server.NewGRPCServer(socket, gapp) |
|
|
|
if err != nil { |
|
|
|
return nil, nil, err |
|
|
|
} |
|
|
|
server.SetLogger(log.With(logger, "module", "abci-server")) |
|
|
|
server.SetLogger(logger.With("module", "abci-server")) |
|
|
|
|
|
|
|
client, err := abcicli.NewGRPCClient(socket, true) |
|
|
|
if err != nil { |
|
|
|
server.Stop() |
|
|
|
return nil, nil, err |
|
|
|
} |
|
|
|
client.SetLogger(log.With(logger, "module", "abci-client")) |
|
|
|
client.SetLogger(logger.With("module", "abci-client")) |
|
|
|
return client, server, err |
|
|
|
} |
|
|
|
|
|
|
|