Skip to content

Commit

Permalink
chore(state/core_accessor): remove query cli (#3307)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Apr 11, 2024
1 parent 32f8856 commit 0231275
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions state/core_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type CoreAccessor struct {
signer *apptypes.KeyringSigner
getter libhead.Head[*header.ExtendedHeader]

queryCli banktypes.QueryClient
stakingCli stakingtypes.QueryClient
rpcCli rpcclient.ABCIClient

Expand Down Expand Up @@ -114,9 +113,7 @@ func (ca *CoreAccessor) Start(ctx context.Context) error {
return err
}
ca.coreConn = client
// create the query client
queryCli := banktypes.NewQueryClient(ca.coreConn)
ca.queryCli = queryCli

// create the staking query client
stakingCli := stakingtypes.NewQueryClient(ca.coreConn)
ca.stakingCli = stakingCli
Expand Down Expand Up @@ -153,7 +150,6 @@ func (ca *CoreAccessor) Stop(context.Context) error {
}

ca.coreConn = nil
ca.queryCli = nil
return nil
}

Expand Down
4 changes: 0 additions & 4 deletions state/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/cosmos/cosmos-sdk/client/flags"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down Expand Up @@ -62,9 +61,6 @@ func (s *IntegrationTestSuite) SetupSuite() {

func setClients(ca *CoreAccessor, conn *grpc.ClientConn, abciCli rpcclient.ABCIClient) {
ca.coreConn = conn
// create the query client
queryCli := banktypes.NewQueryClient(ca.coreConn)
ca.queryCli = queryCli
// create the staking query client
stakingCli := stakingtypes.NewQueryClient(ca.coreConn)
ca.stakingCli = stakingCli
Expand Down

0 comments on commit 0231275

Please sign in to comment.