Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidterpay committed Dec 7, 2023
1 parent 365a483 commit 63a711a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions block/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package service
import (
"context"

"github.com/cosmos/cosmos-sdk/client"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"

Expand Down Expand Up @@ -32,16 +31,15 @@ func NewQueryService(mempool block.Mempool) *QueryService {
// GetTxDistribution returns the current distribution of transactions in the
// mempool.
func (s *QueryService) GetTxDistribution(
ctx context.Context,
req *types.GetTxDistributionRequest,
_ context.Context,
_ *types.GetTxDistributionRequest,
) (*types.GetTxDistributionResponse, error) {
distribution := s.mempool.GetTxDistribution()
return &types.GetTxDistributionResponse{Distribution: distribution}, nil
}

// RegisterMempoolService registers the Block SDK mempool queries on the gRPC router.
func RegisterMempoolService(
clientCtx client.Context,
server gogogrpc.Server,
mempool block.Mempool,
) {
Expand Down
8 changes: 4 additions & 4 deletions tests/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,16 +399,16 @@ func (app *TestApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo
}

// RegisterTxService implements the Application.RegisterTxService method.
func (a *TestApp) RegisterTxService(clientCtx client.Context) {
func (app *TestApp) RegisterTxService(clientCtx client.Context) {
// Register the base app transaction service.
a.App.RegisterTxService(clientCtx)
app.App.RegisterTxService(clientCtx)

// Register the Block SDK mempool transaction service.
mempool, ok := a.App.Mempool().(block.Mempool)
mempool, ok := app.App.Mempool().(block.Mempool)
if !ok {
panic("mempool is not a block.Mempool")
}
service.RegisterMempoolService(clientCtx, a.GRPCQueryRouter(), mempool)
service.RegisterMempoolService(app.GRPCQueryRouter(), mempool)
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down

0 comments on commit 63a711a

Please sign in to comment.