@@ -15,14 +15,14 @@ import (
1515
1616 "github.com/libp2p/go-libp2p/core/crypto"
1717 "github.com/libp2p/go-libp2p/core/peer"
18+ abcicli "github.com/tendermint/tendermint/abci/client"
1819 abci "github.com/tendermint/tendermint/abci/types"
1920 tmcrypto "github.com/tendermint/tendermint/crypto"
2021 "github.com/tendermint/tendermint/crypto/ed25519"
2122 "github.com/tendermint/tendermint/crypto/encoding"
2223 "github.com/tendermint/tendermint/libs/bytes"
2324 "github.com/tendermint/tendermint/libs/log"
2425 tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
25- "github.com/tendermint/tendermint/proxy"
2626 tmtypes "github.com/tendermint/tendermint/types"
2727
2828 "github.com/celestiaorg/optimint/config"
@@ -40,14 +40,11 @@ var expectedInfo = abci.ResponseInfo{
4040
4141var mockTxProcessingTime = 10 * time .Millisecond
4242
43- func TestConnectionGetters (t * testing.T ) {
43+ func TestConnectionGetter (t * testing.T ) {
4444 assert := assert .New (t )
4545
4646 _ , rpc := getRPC (t )
47- assert .NotNil (rpc .consensus ())
48- assert .NotNil (rpc .mempool ())
49- assert .NotNil (rpc .snapshot ())
50- assert .NotNil (rpc .query ())
47+ assert .NotNil (rpc .appClient ())
5148}
5249
5350func TestInfo (t * testing.T ) {
@@ -91,7 +88,7 @@ func TestGenesisChunked(t *testing.T) {
9188 mockApp .On ("InitChain" , mock .Anything ).Return (abci.ResponseInitChain {})
9289 privKey , _ , _ := crypto .GenerateEd25519Key (cryptorand .Reader )
9390 signingKey , _ , _ := crypto .GenerateEd25519Key (cryptorand .Reader )
94- n , _ := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" }, privKey , signingKey , proxy . NewLocalClientCreator ( mockApp ), genDoc , log .TestingLogger ())
91+ n , _ := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" }, privKey , signingKey , abcicli . NewLocalClient ( nil , mockApp ), genDoc , log .TestingLogger ())
9592
9693 rpc := NewClient (n )
9794
@@ -410,7 +407,7 @@ func TestTx(t *testing.T) {
410407 BlockManagerConfig : config.BlockManagerConfig {
411408 BlockTime : 200 * time .Millisecond ,
412409 }},
413- key , signingKey , proxy . NewLocalClientCreator ( mockApp ),
410+ key , signingKey , abcicli . NewLocalClient ( nil , mockApp ),
414411 & tmtypes.GenesisDoc {ChainID : "test" },
415412 log .TestingLogger ())
416413 require .NoError (err )
@@ -657,7 +654,7 @@ func TestValidatorSetHandling(t *testing.T) {
657654 waitCh <- nil
658655 })
659656
660- node , err := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" , Aggregator : true , BlockManagerConfig : config.BlockManagerConfig {BlockTime : 10 * time .Millisecond }}, key , signingKey , proxy . NewLocalClientCreator ( app ), & tmtypes.GenesisDoc {ChainID : "test" , Validators : genesisValidators }, log .TestingLogger ())
657+ node , err := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" , Aggregator : true , BlockManagerConfig : config.BlockManagerConfig {BlockTime : 10 * time .Millisecond }}, key , signingKey , abcicli . NewLocalClient ( nil , app ), & tmtypes.GenesisDoc {ChainID : "test" , Validators : genesisValidators }, log .TestingLogger ())
661658 require .NoError (err )
662659 require .NotNil (node )
663660
@@ -777,7 +774,7 @@ func getRPC(t *testing.T) (*mocks.Application, *Client) {
777774 app .On ("InitChain" , mock .Anything ).Return (abci.ResponseInitChain {})
778775 key , _ , _ := crypto .GenerateEd25519Key (crand .Reader )
779776 signingKey , _ , _ := crypto .GenerateEd25519Key (crand .Reader )
780- node , err := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" }, key , signingKey , proxy . NewLocalClientCreator ( app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
777+ node , err := node .NewNode (context .Background (), config.NodeConfig {DALayer : "mock" }, key , signingKey , abcicli . NewLocalClient ( nil , app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
781778 require .NoError (err )
782779 require .NotNil (node )
783780
@@ -847,7 +844,7 @@ func TestMempool2Nodes(t *testing.T) {
847844 P2P : config.P2PConfig {
848845 ListenAddress : "/ip4/127.0.0.1/tcp/9001" ,
849846 },
850- }, key1 , signingKey1 , proxy . NewLocalClientCreator ( app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
847+ }, key1 , signingKey1 , abcicli . NewLocalClient ( nil , app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
851848 require .NoError (err )
852849 require .NotNil (node1 )
853850
@@ -857,7 +854,7 @@ func TestMempool2Nodes(t *testing.T) {
857854 ListenAddress : "/ip4/127.0.0.1/tcp/9002" ,
858855 Seeds : "/ip4/127.0.0.1/tcp/9001/p2p/" + id1 .Pretty (),
859856 },
860- }, key2 , signingKey2 , proxy . NewLocalClientCreator ( app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
857+ }, key2 , signingKey2 , abcicli . NewLocalClient ( nil , app ), & tmtypes.GenesisDoc {ChainID : "test" }, log .TestingLogger ())
861858 require .NoError (err )
862859 require .NotNil (node1 )
863860
0 commit comments