Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into use-ibc-proto-build
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Jul 9, 2023
2 parents b248cea + 353410e commit b5148c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- register NodeService to enable query /cosmos/base/node/v1beta1/config
gRPC query to disclose node operator's configured minimum-gas-price.
([\#2629](https://github.com/cosmos/gaia/issues/2629))
8 changes: 8 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -307,6 +308,8 @@ func (app *GaiaApp) SimulationManager() *module.SimulationManager {
func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
clientCtx := apiSvr.ClientCtx
rpc.RegisterRoutes(clientCtx, apiSvr.Router)

nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register legacy tx routes.
authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)
// Register new tx routes from grpc-gateway.
Expand All @@ -324,6 +327,11 @@ func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo
}
}

// RegisterTxService allows query minimum-gas-prices in app.toml
func (app *GaiaApp) RegisterNodeService(clientCtx client.Context) {
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter())
}

// RegisterTxService implements the Application.RegisterTxService method.
func (app *GaiaApp) RegisterTxService(clientCtx client.Context) {
authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry)
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/e2e_rest_regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const (
slashingParamsModuleQueryPath = "/slashing/parameters"
stakingParamsModuleQueryPath = "/staking/parameters"
missingPath = "/missing_endpoint"
localMinGasPriceQueryPath = "/cosmos/base/node/v1beta1/config"
)

func (s *IntegrationTestSuite) testRestInterfaces() {
Expand Down Expand Up @@ -73,6 +74,8 @@ func (s *IntegrationTestSuite) testRestInterfaces() {
{slashingParamsModuleQueryPath, 200},
{stakingParamsModuleQueryPath, 200},
{missingPath, 501},
// node config Endpoint
{localMinGasPriceQueryPath, 200},
}
)

Expand Down

0 comments on commit b5148c5

Please sign in to comment.