Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
atheeshp committed Feb 9, 2024
1 parent 6c53579 commit 02bced9
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ go-version:

go.sum: go.mod
@echo "Ensuring app dependencies have not been modified..."
go mod verify
# go mod verify // TODO: revisit
go mod tidy

verify:
Expand Down
3 changes: 3 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1150,3 +1150,6 @@ func BlockedAddresses() map[string]bool {

return modAccAddrs
}

func (app *App) RegisterUpgradeHandlers() {
}
1 change: 0 additions & 1 deletion cmd/cheqd-noded/cmd/init_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func applyConfigDefaults(cmd *cobra.Command) error {

err := updateTmConfig(clientCtx.HomeDir, func(config *tmcfg.Config) {
config.Consensus.CreateEmptyBlocks = false
config.FastSync.Version = "v0"
config.LogFormat = "json"
config.LogLevel = "error"
config.P2P.SendRate = 20000000
Expand Down
35 changes: 24 additions & 11 deletions cmd/cheqd-noded/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/auth/types"
vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
"github.com/spf13/cast"
Expand All @@ -53,8 +52,8 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
WithLegacyAmino(encodingConfig.Amino).
WithInput(os.Stdin).
WithAccountRetriever(types.AccountRetriever{}).
WithBroadcastMode(flags.BroadcastBlock).
WithHomeDir(app.DefaultNodeHome)
WithHomeDir(app.DefaultNodeHome).
WithViper("")

rootCmd := &cobra.Command{
Use: app.Name + "d",
Expand Down Expand Up @@ -89,27 +88,35 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {

rootCmd.AddCommand(
extendInit(genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome)),
genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
genutilcli.MigrateGenesisCmd(),
genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
genutilcli.ValidateGenesisCmd(app.ModuleBasics),
AddGenesisAccountCmd(app.DefaultNodeHome),
tmcli.NewCompletionCmd(rootCmd, true),
extendDebug(debug.Cmd()),
)

a := appCreator{encodingConfig}
server.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags)
server.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, appExport, addModuleInitFlags)

// add keybase, auxiliary RPC, query, and tx child commands
rootCmd.AddCommand(
rpc.StatusCommand(),
genesisCommand(encodingConfig),
queryCommand(),
txCommand(),
keys.Commands(app.DefaultNodeHome),
)
}

// genesisCommand builds genesis-related `universus genesis` command.
// Users may provide application specific commands as a parameter
func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command {
cmd := genutilcli.GenesisCoreCommand(encodingConfig.TxConfig, app.ModuleBasics, app.DefaultNodeHome)

for _, sub_cmd := range cmds {
cmd.AddCommand(sub_cmd)
}
return cmd
}

func addModuleInitFlags(startCmd *cobra.Command) {
crisis.AddModuleInitFlags(startCmd)
// this line is used by starport scaffolding # stargate/root/initFlags
Expand Down Expand Up @@ -225,9 +232,15 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
}

// appExport creates a new simapp (optionally at a given height)
func (a appCreator) appExport(
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string,
func appExport(
logger log.Logger,
db dbm.DB,
traceStore io.Writer,
height int64,
forZeroHeight bool,
jailAllowedAddrs []string,
appOpts servertypes.AppOptions,
modulesToExport []string,
) (servertypes.ExportedApp, error) {
var anApp *app.App

Expand Down Expand Up @@ -268,7 +281,7 @@ func (a appCreator) appExport(
)
}

return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
}

func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
github.com/stretchr/testify v1.8.4
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.32.0
)

require (
Expand Down Expand Up @@ -189,7 +190,6 @@ require (
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
go 1.21

toolchain go1.21.0

use (
.
./api
Expand Down
2 changes: 1 addition & 1 deletion x/did/types/diddoc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/resource/types/resource.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 02bced9

Please sign in to comment.