unwind client creator

This commit is contained in:
tycho garen
2022-03-04 15:23:08 -05:00
parent fa1520dd90
commit 21f93fa15e
13 changed files with 63 additions and 80 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ func startNode(ctx context.Context, cfg *Config) error {
ctx,
tmcfg,
nodeLogger,
abciclient.NewLocalCreator(app),
abciclient.NewLocalClient(nodeLogger, app),
nil,
)
if err != nil {
+4 -9
View File
@@ -15,9 +15,9 @@ var getMp func() mempool.Mempool
func init() {
app := kvstore.NewApplication()
cc := abciclient.NewLocalCreator(app)
appConnMem, _ := cc(log.NewNopLogger())
err := appConnMem.Start(context.TODO())
logger := log.NewNopLogger()
conn := abciclient.NewLocalClient(logger, app)
err := conn.Start(context.TODO())
if err != nil {
panic(err)
}
@@ -27,12 +27,7 @@ func init() {
getMp = func() mempool.Mempool {
if mp == nil {
mp = mempool.NewTxMempool(
log.NewNopLogger(),
cfg,
appConnMem,
)
mp = mempool.NewTxMempool(logger, cfg, conn)
}
return mp
}