@@ -16,7 +16,6 @@ import (
1616 "github.com/cosmos/evm/rpc/namespaces/ethereum/txpool"
1717 "github.com/cosmos/evm/rpc/namespaces/ethereum/web3"
1818 "github.com/cosmos/evm/rpc/stream"
19- "github.com/cosmos/evm/server/config"
2019 servertypes "github.com/cosmos/evm/server/types"
2120
2221 "github.com/cosmos/cosmos-sdk/client"
@@ -50,7 +49,6 @@ type APICreator = func(
5049 allowUnprotectedTxs bool ,
5150 indexer servertypes.EVMTxIndexer ,
5251 mempool * evmmempool.ExperimentalEVMMempool ,
53- backupGRPCClientConns config.BackupGRPCConnections ,
5452) []rpc.API
5553
5654// apiCreators defines the JSON-RPC API namespaces.
@@ -64,9 +62,8 @@ func init() {
6462 allowUnprotectedTxs bool ,
6563 indexer servertypes.EVMTxIndexer ,
6664 mempool * evmmempool.ExperimentalEVMMempool ,
67- backupGRPCClientConns config.BackupGRPCConnections ,
6865 ) []rpc.API {
69- evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )
66+ evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool )
7067 return []rpc.API {
7168 {
7269 Namespace : EthNamespace ,
@@ -82,7 +79,7 @@ func init() {
8279 },
8380 }
8481 },
85- Web3Namespace : func (* server.Context , client.Context , * stream.RPCStream , bool , servertypes.EVMTxIndexer , * evmmempool.ExperimentalEVMMempool , config. BackupGRPCConnections ) []rpc.API {
82+ Web3Namespace : func (* server.Context , client.Context , * stream.RPCStream , bool , servertypes.EVMTxIndexer , * evmmempool.ExperimentalEVMMempool ) []rpc.API {
8683 return []rpc.API {
8784 {
8885 Namespace : Web3Namespace ,
@@ -92,7 +89,7 @@ func init() {
9289 },
9390 }
9491 },
95- NetNamespace : func (ctx * server.Context , clientCtx client.Context , _ * stream.RPCStream , _ bool , _ servertypes.EVMTxIndexer , _ * evmmempool.ExperimentalEVMMempool , _ config. BackupGRPCConnections ) []rpc.API {
92+ NetNamespace : func (ctx * server.Context , clientCtx client.Context , _ * stream.RPCStream , _ bool , _ servertypes.EVMTxIndexer , _ * evmmempool.ExperimentalEVMMempool ) []rpc.API {
9693 return []rpc.API {
9794 {
9895 Namespace : NetNamespace ,
@@ -108,9 +105,8 @@ func init() {
108105 allowUnprotectedTxs bool ,
109106 indexer servertypes.EVMTxIndexer ,
110107 mempool * evmmempool.ExperimentalEVMMempool ,
111- backupGRPCClientConns config.BackupGRPCConnections ,
112108 ) []rpc.API {
113- evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )
109+ evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool )
114110 return []rpc.API {
115111 {
116112 Namespace : PersonalNamespace ,
@@ -126,9 +122,8 @@ func init() {
126122 allowUnprotectedTxs bool ,
127123 indexer servertypes.EVMTxIndexer ,
128124 mempool * evmmempool.ExperimentalEVMMempool ,
129- backupGRPCClientConns config.BackupGRPCConnections ,
130125 ) []rpc.API {
131- evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )
126+ evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool )
132127 return []rpc.API {
133128 {
134129 Namespace : TxPoolNamespace ,
@@ -144,9 +139,8 @@ func init() {
144139 allowUnprotectedTxs bool ,
145140 indexer servertypes.EVMTxIndexer ,
146141 mempool * evmmempool.ExperimentalEVMMempool ,
147- backupGRPCClientConns config.BackupGRPCConnections ,
148142 ) []rpc.API {
149- evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )
143+ evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool )
150144 return []rpc.API {
151145 {
152146 Namespace : DebugNamespace ,
@@ -162,9 +156,8 @@ func init() {
162156 allowUnprotectedTxs bool ,
163157 indexer servertypes.EVMTxIndexer ,
164158 mempool * evmmempool.ExperimentalEVMMempool ,
165- backupGRPCClientConns config.BackupGRPCConnections ,
166159 ) []rpc.API {
167- evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )
160+ evmBackend := backend .NewBackend (ctx , ctx .Logger , clientCtx , allowUnprotectedTxs , indexer , mempool )
168161 return []rpc.API {
169162 {
170163 Namespace : MinerNamespace ,
@@ -185,13 +178,12 @@ func GetRPCAPIs(ctx *server.Context,
185178 indexer servertypes.EVMTxIndexer ,
186179 selectedAPIs []string ,
187180 mempool * evmmempool.ExperimentalEVMMempool ,
188- backupGRPCClientConns config.BackupGRPCConnections ,
189181) []rpc.API {
190182 var apis []rpc.API
191183
192184 for _ , ns := range selectedAPIs {
193185 if creator , ok := apiCreators [ns ]; ok {
194- apis = append (apis , creator (ctx , clientCtx , stream , allowUnprotectedTxs , indexer , mempool , backupGRPCClientConns )... )
186+ apis = append (apis , creator (ctx , clientCtx , stream , allowUnprotectedTxs , indexer , mempool )... )
195187 } else {
196188 ctx .Logger .Error ("invalid namespace value" , "namespace" , ns )
197189 }
0 commit comments