Skip to content

Commit

Permalink
chore: add node service handler (#233)
Browse files Browse the repository at this point in the history
* chore: add node service handler

* chore: fix
  • Loading branch information
freak12techno authored Aug 9, 2024
1 parent cf24787 commit 608415a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import (
fantokenclient "github.com/bitsongofficial/go-bitsong/x/fantoken/client"
merkledropclient "github.com/bitsongofficial/go-bitsong/x/merkledrop/client"
"github.com/cosmos/cosmos-sdk/baseapp"
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 @@ -818,6 +819,8 @@ func (app *BitsongApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.AP
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register new tendermint queries routes from grpc-gateway.
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register new tendermint queries routes from grpc-gateway.
nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// Register legacy and grpc-gateway routes for all modules.
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
Expand All @@ -839,6 +842,11 @@ func (app *BitsongApp) RegisterTendermintService(clientCtx client.Context) {
tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry)
}

// RegisterNodeService implements the Application.RegisterNodeService method.
func (app *BitsongApp) RegisterNodeService(clientCtx client.Context) {
nodeservice.RegisterNodeService(clientCtx, app.BaseApp.GRPCQueryRouter())
}

func (app *BitsongApp) setupUpgradeStoreLoaders() {
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
Expand Down

0 comments on commit 608415a

Please sign in to comment.