node: collapse initialization internals (#7567)

This commit is contained in:
Sam Kleinman
2022-01-12 15:32:22 -05:00
committed by GitHub
parent 5c1399d803
commit e07c4cdcf2
9 changed files with 87 additions and 110 deletions
+3 -2
View File
@@ -20,6 +20,7 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/internal/mempool"
rpccore "github.com/tendermint/tendermint/internal/rpc/core"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/libs/log"
tmmath "github.com/tendermint/tendermint/libs/math"
@@ -576,10 +577,10 @@ func TestClientMethodCalls(t *testing.T) {
func getMempool(t *testing.T, srv service.Service) mempool.Mempool {
t.Helper()
n, ok := srv.(interface {
Mempool() mempool.Mempool
RPCEnvironment() *rpccore.Environment
})
require.True(t, ok)
return n.Mempool()
return n.RPCEnvironment().Mempool
}
// these cases are roughly the same as the TestClientMethodCalls, but