From 34dabc64d68792314ec1a43cbde5ed2bd591246d Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Sat, 16 Mar 2024 22:03:57 +0700 Subject: [PATCH 1/4] lint tests --- .golangci.yml | 11 +++-------- app/ante/handlers.go | 2 +- app/app.go | 6 +++--- app/apptesting/test_helpers.go | 4 +--- app/apptesting/test_suite.go | 2 +- app/export.go | 1 - app/upgrades/v3/upgrade.go | 3 --- cmd/dymd/cmd/inspect.go | 2 +- cmd/dymd/cmd/inspect_tendermint.go | 2 +- cmd/dymd/cmd/root.go | 1 - simulation/simapp.go | 7 ++----- testutil/network/network.go | 2 +- x/common/types/key_rollapp_packet.go | 2 +- x/delayedack/eibc.go | 3 ++- x/delayedack/keeper/keeper.go | 1 - x/delayedack/proof_height_ante.go | 3 +-- x/delayedack/types/params.go | 6 ++---- x/denommetadata/ibc_middleware.go | 2 +- x/eibc/client/cli/query_command_orders.go | 1 - x/eibc/client/cli/tx.go | 4 +--- x/eibc/keeper/grpc_query.go | 2 +- x/eibc/keeper/hooks.go | 3 ++- x/eibc/keeper/keeper.go | 2 -- x/eibc/module_simulation.go | 1 - x/eibc/types/keys.go | 2 +- x/rollapp/client/cli/tx.go | 4 +--- x/rollapp/client/cli/tx_create_rollapp.go | 4 +--- x/rollapp/client/cli/tx_update_state.go | 3 +-- x/rollapp/client/proposal_handler.go | 4 +--- .../keeper/block_height_to_finalization_queue.go | 6 ++---- x/rollapp/keeper/fraud_proposal.go | 4 ++-- x/rollapp/keeper/grpc_query_rollapp.go | 3 +-- x/rollapp/keeper/grpc_query_state_info.go | 1 - x/rollapp/keeper/invariants.go | 12 ++++++------ x/rollapp/keeper/keeper.go | 1 - x/rollapp/keeper/latest_finalized_state_index.go | 2 -- x/rollapp/keeper/latest_state_info_index.go | 2 -- x/rollapp/keeper/msg_server_create_rollapp.go | 2 +- x/rollapp/keeper/rollapp.go | 1 - x/rollapp/keeper/state_info.go | 2 -- x/rollapp/simulation/update_state.go | 2 -- x/rollapp/types/state_info.go | 6 ++---- x/sequencer/client/cli/tx.go | 1 - x/sequencer/keeper/grpc_query_sequencer.go | 1 - x/sequencer/keeper/hook_listener.go | 2 +- x/sequencer/keeper/keeper.go | 1 - x/sequencer/keeper/msg_server_unbond.go | 2 +- x/sequencer/keeper/sequencer.go | 6 +++--- x/sequencer/keeper/slashing.go | 2 +- x/sequencer/module_simulation.go | 1 - x/sequencer/simulation/create_sequencer.go | 1 - x/sequencer/types/genesis.go | 4 ++-- x/streamer/client/cli/query.go | 12 ++++++++---- x/streamer/keeper/hooks.go | 6 ++++-- x/streamer/keeper/keeper.go | 2 +- x/streamer/types/genesis.go | 2 +- x/streamer/types/proposal_distribution.go | 7 ++++--- x/streamer/types/proposal_stream.go | 7 ++++--- 58 files changed, 74 insertions(+), 117 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1d93735be..110e41cfd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,6 @@ run: timeout: 5m + tests: true modules-download-mode: readonly skip-files: - ./*_test.go @@ -7,22 +8,16 @@ run: linters: disable-all: true enable: - - gofmt - - goimports + - gofumpt - misspell - revive - - deadcode - errcheck - - gosimple - govet - ineffassign - staticcheck - - structcheck - typecheck - unused - - varcheck - gosec - - gocyclo issues: exclude-use-default: false @@ -37,4 +32,4 @@ linters-settings: disabled: true errcheck: check-type-assertions: true - \ No newline at end of file + diff --git a/app/ante/handlers.go b/app/ante/handlers.go index 05350efaa..cfa63a400 100644 --- a/app/ante/handlers.go +++ b/app/ante/handlers.go @@ -17,7 +17,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { return sdk.ChainAnteDecorators( ethante.NewEthSetUpContextDecorator(options.EvmKeeper), - //FIXME: need to allow universal fees for Eth as well + // FIXME: need to allow universal fees for Eth as well ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices ethante.NewEthMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), // Check eth effective gas price against the global MinGasPrice diff --git a/app/app.go b/app/app.go index ebc179968..715dd481f 100644 --- a/app/app.go +++ b/app/app.go @@ -737,7 +737,7 @@ func New( // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. - var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) + skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. @@ -927,7 +927,7 @@ func New( TxFeesKeeper: app.TxFeesKeeper, SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), MaxTxGasWanted: maxGasWanted, - ExtensionOptionChecker: nil, //uses default + ExtensionOptionChecker: nil, // uses default }) if err != nil { panic(err) @@ -988,7 +988,7 @@ func (app *App) ModuleAccountAddrs() map[string]bool { modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true } - //exclude the streamer as we want him to be able to get external incentives + // exclude the streamer as we want him to be able to get external incentives modAccAddrs[authtypes.NewModuleAddress(streamermoduletypes.ModuleName).String()] = false return modAccAddrs } diff --git a/app/apptesting/test_helpers.go b/app/apptesting/test_helpers.go index 35be2f4df..d9e2b1802 100644 --- a/app/apptesting/test_helpers.go +++ b/app/apptesting/test_helpers.go @@ -58,9 +58,7 @@ var DefaultConsensusParams = &abci.ConsensusParams{ }, } -var ( - TestChainID = "dymension_100-1" -) +var TestChainID = "dymension_100-1" // SetupOptions defines arguments that are passed into `Simapp` constructor. type SetupOptions struct { diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index cea0ccc76..c9bfc61a0 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -48,7 +48,7 @@ func (suite *KeeperTestHelper) CreateDefaultSequencer(ctx sdk.Context, rollappId pkAny1, err := codectypes.NewAnyWithValue(pubkey1) suite.Require().Nil(err) - //fund account + // fund account err = bankutil.FundAccount(suite.App.BankKeeper, ctx, addr1, sdk.NewCoins(bond)) suite.Require().Nil(err) diff --git a/app/export.go b/app/export.go index 55775d017..b98d109c1 100644 --- a/app/export.go +++ b/app/export.go @@ -19,7 +19,6 @@ import ( func (app *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error) { - // as if they could withdraw from the start of the next block ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) diff --git a/app/upgrades/v3/upgrade.go b/app/upgrades/v3/upgrade.go index 41be81753..f7e11e95e 100644 --- a/app/upgrades/v3/upgrade.go +++ b/app/upgrades/v3/upgrade.go @@ -19,11 +19,8 @@ func GetStoreUpgrades() *storetypes.StoreUpgrades { func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, - ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - logger := ctx.Logger().With("upgrade", UpgradeName) // Start running the module migrations diff --git a/cmd/dymd/cmd/inspect.go b/cmd/dymd/cmd/inspect.go index 84a78be20..8e28dea94 100644 --- a/cmd/dymd/cmd/inspect.go +++ b/cmd/dymd/cmd/inspect.go @@ -48,7 +48,7 @@ func InspectCmd(appExporter types.AppExporter, appCreator types.AppCreator, defa return err } - //TODO: fix to flag + // TODO: fix to flag if len(args) > 0 && args[0] == "tendermint" { return getTendermintState(serverCtx.Config) } diff --git a/cmd/dymd/cmd/inspect_tendermint.go b/cmd/dymd/cmd/inspect_tendermint.go index 5e99763b7..ab66b3aa2 100644 --- a/cmd/dymd/cmd/inspect_tendermint.go +++ b/cmd/dymd/cmd/inspect_tendermint.go @@ -74,7 +74,7 @@ func getTendermintState(config *cfg.Config) error { fmt.Printf("%+v\n", latestBlock) if bh != state.LastBlockHeight { - //priniting block for state height + // priniting block for state height fmt.Println("LOADING BLOCK FOR STATE HEIGHT") block := blockStore.LoadBlock(state.LastBlockHeight) if block == nil { diff --git a/cmd/dymd/cmd/root.go b/cmd/dymd/cmd/root.go index 3b17036f7..e9c30c57a 100644 --- a/cmd/dymd/cmd/root.go +++ b/cmd/dymd/cmd/root.go @@ -159,7 +159,6 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig txCommand(), ethermintclient.KeyCommands(app.DefaultNodeHome), ) - } // queryCommand returns the sub-command to send queries to the app diff --git a/simulation/simapp.go b/simulation/simapp.go index cc04d677a..f1bb511cc 100644 --- a/simulation/simapp.go +++ b/simulation/simapp.go @@ -55,8 +55,8 @@ func GenAndDeliverMsgWithRandFees( bk types.BankKeeper, ak types.AccountKeeper, futureOperation []simtypes.FutureOperation, - bExpectedError bool) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - + bExpectedError bool, +) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { spendableCoins := bk.SpendableCoins(*ctx, simAccount.Address) if spendableCoins.Empty() { @@ -90,7 +90,6 @@ func GenAndDeliverMsgWithRandFees( if err != nil { panic(err) } - } return operationMsg, futureOperation, err } @@ -134,7 +133,6 @@ func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins) (simtypes. []uint64{account.GetSequence()}, txCtx.SimAccount.PrivKey, ) - if err != nil { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to generate mock tx"), nil, err } @@ -145,5 +143,4 @@ func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins) (simtypes. } return simtypes.NewOperationMsg(txCtx.Msg, true, "", txCtx.Cdc), nil, nil - } diff --git a/testutil/network/network.go b/testutil/network/network.go index 28953fd91..623496970 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -45,7 +45,7 @@ func DefaultConfig() network.Config { cfg := network.DefaultConfig() encoding := app.MakeEncodingConfig() - //FIXME: add rand tmrand.Uint64() to chainID + // FIXME: add rand tmrand.Uint64() to chainID cfg.ChainID = "dymension_1000-1" cfg.AppConstructor = func(val network.Validator) servertypes.Application { return app.New( diff --git a/x/common/types/key_rollapp_packet.go b/x/common/types/key_rollapp_packet.go index 8ef5b37a1..3c9241383 100644 --- a/x/common/types/key_rollapp_packet.go +++ b/x/common/types/key_rollapp_packet.go @@ -10,7 +10,7 @@ import ( var _ binary.ByteOrder const ( - //KeySeparator defines the separator for keys + // KeySeparator defines the separator for keys KeySeparator = "/" // // RollappPacketKeyPrefix is the prefix to retrieve all RollappPackets // RollappPacketKeyPrefix = "RollappPacket/value/" diff --git a/x/delayedack/eibc.go b/x/delayedack/eibc.go index c9d2c5530..d6dda6bb6 100644 --- a/x/delayedack/eibc.go +++ b/x/delayedack/eibc.go @@ -90,7 +90,8 @@ func (im IBCMiddleware) eIBCDemandOrderHandler(ctx sdk.Context, chainID string, // calculates the demand order price, and creates a new demand order. // It returns the created demand order or an error if there is any. func (im IBCMiddleware) createDemandOrderFromIBCPacket(fungibleTokenPacketData transfertypes.FungibleTokenPacketData, - rollappPacket *commontypes.RollappPacket, eibcMetaData types.EIBCMetadata) (*eibctypes.DemandOrder, error) { + rollappPacket *commontypes.RollappPacket, eibcMetaData types.EIBCMetadata, +) (*eibctypes.DemandOrder, error) { // Validate the fungible token packet data as we're going to use it to create the demand order if err := fungibleTokenPacketData.ValidateBasic(); err != nil { return nil, err diff --git a/x/delayedack/keeper/keeper.go b/x/delayedack/keeper/keeper.go index 97ecea101..d7cc0bad5 100644 --- a/x/delayedack/keeper/keeper.go +++ b/x/delayedack/keeper/keeper.go @@ -50,7 +50,6 @@ func NewKeeper( clientKeeper types.ClientKeeper, eibcKeeper types.EIBCKeeper, bankKeeper types.BankKeeper, - ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { diff --git a/x/delayedack/proof_height_ante.go b/x/delayedack/proof_height_ante.go index 508188c0d..20a59ef3f 100644 --- a/x/delayedack/proof_height_ante.go +++ b/x/delayedack/proof_height_ante.go @@ -8,8 +8,7 @@ import ( delayedacktypes "github.com/dymensionxyz/dymension/v3/x/delayedack/types" ) -type IBCProofHeightDecorator struct { -} +type IBCProofHeightDecorator struct{} func NewIBCProofHeightDecorator() IBCProofHeightDecorator { return IBCProofHeightDecorator{} diff --git a/x/delayedack/types/params.go b/x/delayedack/types/params.go index e8b40b8f2..a452c70f7 100644 --- a/x/delayedack/types/params.go +++ b/x/delayedack/types/params.go @@ -7,10 +7,8 @@ import ( var _ paramtypes.ParamSet = (*Params)(nil) -var ( - // KeyEpochIdentifier is the key for the epoch identifier - KeyEpochIdentifier = []byte("EpochIdentifier") -) +// KeyEpochIdentifier is the key for the epoch identifier +var KeyEpochIdentifier = []byte("EpochIdentifier") const ( defaultEpochIdentifier = "hour" diff --git a/x/denommetadata/ibc_middleware.go b/x/denommetadata/ibc_middleware.go index 86f40f4f5..4468af622 100644 --- a/x/denommetadata/ibc_middleware.go +++ b/x/denommetadata/ibc_middleware.go @@ -195,7 +195,7 @@ func (im IBCMiddleware) OnRecvPacket( Denom: du.Denom, Exponent: du.Exponent, } - //base denom_unit should be the same as baseDenom + // base denom_unit should be the same as baseDenom if newDu.Exponent == 0 { newDu.Denom = voucherDenom newDu.Aliases = append(newDu.Aliases, du.Denom) diff --git a/x/eibc/client/cli/query_command_orders.go b/x/eibc/client/cli/query_command_orders.go index f1e35441a..feea7a360 100644 --- a/x/eibc/client/cli/query_command_orders.go +++ b/x/eibc/client/cli/query_command_orders.go @@ -23,7 +23,6 @@ func CmdListDemandOrdersByStatus() *cobra.Command { res, err := queryClient.DemandOrdersByStatus(context.Background(), &types.QueryDemandOrdersByStatusRequest{ Status: status, }) - if err != nil { return err } diff --git a/x/eibc/client/cli/tx.go b/x/eibc/client/cli/tx.go index 0670afe0e..3c6192d51 100644 --- a/x/eibc/client/cli/tx.go +++ b/x/eibc/client/cli/tx.go @@ -12,9 +12,7 @@ import ( "github.com/dymensionxyz/dymension/v3/x/eibc/types" ) -var ( - DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) -) +var DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) // GetTxCmd returns the transaction commands for this module func GetTxCmd() *cobra.Command { diff --git a/x/eibc/keeper/grpc_query.go b/x/eibc/keeper/grpc_query.go index 673e95d78..d3d945590 100644 --- a/x/eibc/keeper/grpc_query.go +++ b/x/eibc/keeper/grpc_query.go @@ -42,7 +42,7 @@ func (q Querier) DemandOrderById(goCtx context.Context, req *types.QueryGetDeman // Get the demand order by its ID and search for it in all statuses var demandOrder *types.DemandOrder var err error - var statuses = []commontypes.Status{commontypes.Status_PENDING, commontypes.Status_FINALIZED, commontypes.Status_REVERTED} + statuses := []commontypes.Status{commontypes.Status_PENDING, commontypes.Status_FINALIZED, commontypes.Status_REVERTED} for _, status := range statuses { demandOrder, err = q.GetDemandOrder(ctx, status, req.Id) if err == nil && demandOrder != nil { diff --git a/x/eibc/keeper/hooks.go b/x/eibc/keeper/hooks.go index e387abc45..66ded9800 100644 --- a/x/eibc/keeper/hooks.go +++ b/x/eibc/keeper/hooks.go @@ -31,7 +31,8 @@ func (k Keeper) GetDelayedAckHooks() delayeacktypes.DelayedAckHooks { // 1. The packet status can change only once hence the oldPacketKey should always represent the order ID as it was created from it. // 2. The packet status can only change from PENDING func (d delayedAckHooks) AfterPacketStatusUpdated(ctx sdk.Context, packet *commontypes.RollappPacket, - oldPacketKey string, newPacketKey string) error { + oldPacketKey string, newPacketKey string, +) error { // Get the demand order from the old packet key demandOrderID := types.BuildDemandIDFromPacketKey(oldPacketKey) demandOrder, err := d.GetDemandOrder(ctx, commontypes.Status_PENDING, demandOrderID) diff --git a/x/eibc/keeper/keeper.go b/x/eibc/keeper/keeper.go index a41fd137a..9488222e5 100644 --- a/x/eibc/keeper/keeper.go +++ b/x/eibc/keeper/keeper.go @@ -35,7 +35,6 @@ func NewKeeper( accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, delayedAckKeeper types.DelayedAckKeeper, - ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -77,7 +76,6 @@ func (k Keeper) SetDemandOrder(ctx sdk.Context, order *types.DemandOrder) error ) return nil - } func (k Keeper) deleteDemandOrder(ctx sdk.Context, order *types.DemandOrder) error { diff --git a/x/eibc/module_simulation.go b/x/eibc/module_simulation.go index af0257762..a892f7c3b 100644 --- a/x/eibc/module_simulation.go +++ b/x/eibc/module_simulation.go @@ -47,7 +47,6 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP // RandomizedParams creates randomized param changes for the simulator func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} } diff --git a/x/eibc/types/keys.go b/x/eibc/types/keys.go index 909f5a72c..437f0997b 100644 --- a/x/eibc/types/keys.go +++ b/x/eibc/types/keys.go @@ -13,7 +13,7 @@ const ( // ModuleName defines the module name ModuleName = "eibc" - //KeySeparator defines the separator for keys + // KeySeparator defines the separator for keys KeySeparator = "/" // StoreKey defines the primary module store key diff --git a/x/rollapp/client/cli/tx.go b/x/rollapp/client/cli/tx.go index d582cfdf7..e03463286 100644 --- a/x/rollapp/client/cli/tx.go +++ b/x/rollapp/client/cli/tx.go @@ -10,9 +10,7 @@ import ( "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) -var ( - DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) -) +var DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) // GetTxCmd returns the transaction commands for this module func GetTxCmd() *cobra.Command { diff --git a/x/rollapp/client/cli/tx_create_rollapp.go b/x/rollapp/client/cli/tx_create_rollapp.go index 87b3863a2..a04e3540a 100644 --- a/x/rollapp/client/cli/tx_create_rollapp.go +++ b/x/rollapp/client/cli/tx_create_rollapp.go @@ -1,11 +1,10 @@ package cli import ( + "encoding/json" "os" "strconv" - "encoding/json" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -83,7 +82,6 @@ func parseTokenMetadata(cdc codec.Codec, path string) ([]types.TokenMetadata, er err = json.Unmarshal(contents, &metadata) if err != nil { return []types.TokenMetadata{}, err - } return metadata, nil } diff --git a/x/rollapp/client/cli/tx_update_state.go b/x/rollapp/client/cli/tx_update_state.go index db89bf8bb..7347d5a2e 100644 --- a/x/rollapp/client/cli/tx_update_state.go +++ b/x/rollapp/client/cli/tx_update_state.go @@ -1,9 +1,8 @@ package cli import ( - "strconv" - "encoding/json" + "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/rollapp/client/proposal_handler.go b/x/rollapp/client/proposal_handler.go index 99d40ab21..775b1043b 100644 --- a/x/rollapp/client/proposal_handler.go +++ b/x/rollapp/client/proposal_handler.go @@ -5,6 +5,4 @@ import ( "github.com/dymensionxyz/dymension/v3/x/rollapp/client/cli" ) -var ( - SubmitFraudHandler = govclient.NewProposalHandler(cli.NewCmdSubmitFraudProposal) -) +var SubmitFraudHandler = govclient.NewProposalHandler(cli.NewCmdSubmitFraudProposal) diff --git a/x/rollapp/keeper/block_height_to_finalization_queue.go b/x/rollapp/keeper/block_height_to_finalization_queue.go index af57b88e9..a5220e457 100644 --- a/x/rollapp/keeper/block_height_to_finalization_queue.go +++ b/x/rollapp/keeper/block_height_to_finalization_queue.go @@ -23,7 +23,6 @@ func (k Keeper) FinalizeQueue(ctx sdk.Context) { continue } wrappedFunc := func(ctx sdk.Context) error { - stateInfo.Finalize() // update the status of the stateInfo k.SetStateInfo(ctx, stateInfo) @@ -55,7 +54,8 @@ func (k Keeper) FinalizeQueue(ctx sdk.Context) { if len(newFinalizationQueue) > 0 { newBlockHeightToFinalizationQueue := types.BlockHeightToFinalizationQueue{ CreationHeight: blockHeightToFinalizationQueue.CreationHeight, - FinalizationQueue: newFinalizationQueue} + FinalizationQueue: newFinalizationQueue, + } k.SetBlockHeightToFinalizationQueue(ctx, newBlockHeightToFinalizationQueue) } @@ -75,7 +75,6 @@ func (k Keeper) SetBlockHeightToFinalizationQueue(ctx sdk.Context, blockHeightTo func (k Keeper) GetBlockHeightToFinalizationQueue( ctx sdk.Context, creationHeight uint64, - ) (val types.BlockHeightToFinalizationQueue, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeightToFinalizationQueueKeyPrefix)) @@ -94,7 +93,6 @@ func (k Keeper) GetBlockHeightToFinalizationQueue( func (k Keeper) RemoveBlockHeightToFinalizationQueue( ctx sdk.Context, creationHeight uint64, - ) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeightToFinalizationQueueKeyPrefix)) store.Delete(types.BlockHeightToFinalizationQueueKey( diff --git a/x/rollapp/keeper/fraud_proposal.go b/x/rollapp/keeper/fraud_proposal.go index 58165617d..e1af287ed 100644 --- a/x/rollapp/keeper/fraud_proposal.go +++ b/x/rollapp/keeper/fraud_proposal.go @@ -24,7 +24,7 @@ func (k Keeper) HandleFraud(ctx sdk.Context, rollappID, clientId string, height return err } - //TODO: mark the rollapp as frozen (if immutable) or mark the fraud height to allow overwriting + // TODO: mark the rollapp as frozen (if immutable) or mark the fraud height to allow overwriting if stateInfo.Sequencer != seqAddr { return sdkerrors.Wrapf(types.ErrInvalidSequencer, "sequencer address %s does not match the one in the state info", seqAddr) @@ -36,7 +36,7 @@ func (k Keeper) HandleFraud(ctx sdk.Context, rollappID, clientId string, height return err } - //FIXME: make sure the clientId corresponds to the rollappID + // FIXME: make sure the clientId corresponds to the rollappID clientState, ok := k.ibcclientkeeper.GetClientState(ctx, clientId) if !ok { diff --git a/x/rollapp/keeper/grpc_query_rollapp.go b/x/rollapp/keeper/grpc_query_rollapp.go index 56c7e670d..8bd668022 100644 --- a/x/rollapp/keeper/grpc_query_rollapp.go +++ b/x/rollapp/keeper/grpc_query_rollapp.go @@ -27,7 +27,7 @@ func (k Keeper) RollappAll(c context.Context, req *types.QueryAllRollappRequest) if err := k.cdc.Unmarshal(value, &rollapp); err != nil { return err } - var rollappSummary = types.RollappSummary{ + rollappSummary := types.RollappSummary{ RollappId: rollapp.RollappId, } latestStateInfoIndex, found := k.GetLatestStateInfoIndex(ctx, rollapp.RollappId) @@ -42,7 +42,6 @@ func (k Keeper) RollappAll(c context.Context, req *types.QueryAllRollappRequest) rollapps = append(rollapps, rollappSummary) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/rollapp/keeper/grpc_query_state_info.go b/x/rollapp/keeper/grpc_query_state_info.go index 07e742ab2..4b86052af 100644 --- a/x/rollapp/keeper/grpc_query_state_info.go +++ b/x/rollapp/keeper/grpc_query_state_info.go @@ -38,7 +38,6 @@ func (k Keeper) StateInfoAll(c context.Context, req *types.QueryAllStateInfoRequ } return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/rollapp/keeper/invariants.go b/x/rollapp/keeper/invariants.go index 999b19b9f..b9533e4ef 100644 --- a/x/rollapp/keeper/invariants.go +++ b/x/rollapp/keeper/invariants.go @@ -54,7 +54,7 @@ func RollappByEIP155KeyInvariant(k Keeper) sdk.Invariant { continue } - //not breaking invariant, as eip155 format is not required + // not breaking invariant, as eip155 format is not required if eip155 == nil { continue } @@ -90,7 +90,7 @@ func BlockHeightToFinalizationQueueInvariant(k Keeper) sdk.Invariant { firstUnfinalizedStateIdx := latestFinalizedStateIdx.Index + 1 - //iterate over all the unfinalzied states and make sure they are in the queue + // iterate over all the unfinalzied states and make sure they are in the queue for i := firstUnfinalizedStateIdx; i <= latestStateIdx.Index; i++ { stateInfo, found := k.GetStateInfo(ctx, rollapp.RollappId, i) if !found { @@ -99,7 +99,7 @@ func BlockHeightToFinalizationQueueInvariant(k Keeper) sdk.Invariant { continue } creationHeight := stateInfo.CreationHeight - //finalizationTime := creationHeight + k.DisputePeriodInBlocks(ctx) + // finalizationTime := creationHeight + k.DisputePeriodInBlocks(ctx) val, found := k.GetBlockHeightToFinalizationQueue(ctx, creationHeight) if !found { @@ -108,7 +108,7 @@ func BlockHeightToFinalizationQueueInvariant(k Keeper) sdk.Invariant { continue } - //check that our state index is in the queue + // check that our state index is in the queue found = false for _, idx := range val.FinalizationQueue { if idx.RollappId == rollapp.RollappId && idx.Index == i { @@ -146,7 +146,7 @@ func RollappCountInvariant(k Keeper) sdk.Invariant { return "", false } - //If the count is not equal, need to check wether it's due to rollapp that didn't publish state yet + // If the count is not equal, need to check wether it's due to rollapp that didn't publish state yet var noStateRollappCount int for _, rollapp := range rollapps { if !k.IsRollappStarted(ctx, rollapp.RollappId) { @@ -187,7 +187,7 @@ func RollappLatestStateIndexInvariant(k Keeper) sdk.Invariant { } latestFinalizedStateIdx, _ := k.GetLatestFinalizedStateIndex(ctx, rollapp.RollappId) - //not found is ok, it means no finalized state yet + // not found is ok, it means no finalized state yet if latestStateIdx.Index < latestFinalizedStateIdx.Index { msg += fmt.Sprintf("rollapp (%s) have latestStateIdx < latestFinalizedStateIdx\n", rollapp.RollappId) diff --git a/x/rollapp/keeper/keeper.go b/x/rollapp/keeper/keeper.go index 8e5415dcd..4acccdcda 100644 --- a/x/rollapp/keeper/keeper.go +++ b/x/rollapp/keeper/keeper.go @@ -37,7 +37,6 @@ func NewKeeper( } return &Keeper{ - cdc: cdc, storeKey: storeKey, memKey: memKey, diff --git a/x/rollapp/keeper/latest_finalized_state_index.go b/x/rollapp/keeper/latest_finalized_state_index.go index 5d12cc725..e3a637f2e 100644 --- a/x/rollapp/keeper/latest_finalized_state_index.go +++ b/x/rollapp/keeper/latest_finalized_state_index.go @@ -21,7 +21,6 @@ func (k Keeper) SetLatestFinalizedStateIndex(ctx sdk.Context, latestFinalizedSta func (k Keeper) GetLatestFinalizedStateIndex( ctx sdk.Context, rollappId string, - ) (val types.StateInfoIndex, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LatestFinalizedStateIndexKeyPrefix)) @@ -40,7 +39,6 @@ func (k Keeper) GetLatestFinalizedStateIndex( func (k Keeper) RemoveLatestFinalizedStateIndex( ctx sdk.Context, rollappId string, - ) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LatestFinalizedStateIndexKeyPrefix)) store.Delete(types.LatestFinalizedStateIndexKey( diff --git a/x/rollapp/keeper/latest_state_info_index.go b/x/rollapp/keeper/latest_state_info_index.go index 6a3615cee..8df8a7827 100644 --- a/x/rollapp/keeper/latest_state_info_index.go +++ b/x/rollapp/keeper/latest_state_info_index.go @@ -21,7 +21,6 @@ func (k Keeper) SetLatestStateInfoIndex(ctx sdk.Context, latestStateInfoIndex ty func (k Keeper) GetLatestStateInfoIndex( ctx sdk.Context, rollappId string, - ) (val types.StateInfoIndex, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LatestStateInfoIndexKeyPrefix)) @@ -40,7 +39,6 @@ func (k Keeper) GetLatestStateInfoIndex( func (k Keeper) RemoveLatestStateInfoIndex( ctx sdk.Context, rollappId string, - ) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LatestStateInfoIndexKeyPrefix)) store.Delete(types.LatestStateInfoIndexKey( diff --git a/x/rollapp/keeper/msg_server_create_rollapp.go b/x/rollapp/keeper/msg_server_create_rollapp.go index 617e18303..15632a9ad 100644 --- a/x/rollapp/keeper/msg_server_create_rollapp.go +++ b/x/rollapp/keeper/msg_server_create_rollapp.go @@ -61,7 +61,7 @@ func (k msgServer) CreateRollapp(goCtx context.Context, msg *types.MsgCreateRoll PermissionedAddresses: msg.PermissionedAddresses, } - //copy TokenMetadata + // copy TokenMetadata rollapp.TokenMetadata = make([]*types.TokenMetadata, len(msg.Metadatas)) for i := range msg.Metadatas { rollapp.TokenMetadata[i] = &msg.Metadatas[i] diff --git a/x/rollapp/keeper/rollapp.go b/x/rollapp/keeper/rollapp.go index 5e8c14843..193a83dd5 100644 --- a/x/rollapp/keeper/rollapp.go +++ b/x/rollapp/keeper/rollapp.go @@ -67,7 +67,6 @@ func (k Keeper) GetRollapp( func (k Keeper) RemoveRollapp( ctx sdk.Context, rollappId string, - ) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.RollappKeyPrefix)) store.Delete(types.RollappKey( diff --git a/x/rollapp/keeper/state_info.go b/x/rollapp/keeper/state_info.go index a923f97c4..61215464c 100644 --- a/x/rollapp/keeper/state_info.go +++ b/x/rollapp/keeper/state_info.go @@ -20,7 +20,6 @@ func (k Keeper) GetStateInfo( ctx sdk.Context, rollappId string, index uint64, - ) (val types.StateInfo, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.StateInfoKeyPrefix)) @@ -40,7 +39,6 @@ func (k Keeper) RemoveStateInfo( ctx sdk.Context, rollappId string, index uint64, - ) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.StateInfoKeyPrefix)) store.Delete(types.StateInfoKey( diff --git a/x/rollapp/simulation/update_state.go b/x/rollapp/simulation/update_state.go index 19bb5be8e..a7d722d18 100644 --- a/x/rollapp/simulation/update_state.go +++ b/x/rollapp/simulation/update_state.go @@ -18,7 +18,6 @@ func SimulateMsgUpdateState( ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - if len(simulation.GlobalSequencerAddressesList) == 0 { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUpdateState, "No sequencers"), nil, nil } @@ -100,6 +99,5 @@ func SimulateMsgUpdateState( // } return simulation.GenAndDeliverMsgWithRandFees(msg, msg.Type(), types.ModuleName, r, app, &ctx, &sequencer.Account, bk, ak, nil, bExpectedError) - } } diff --git a/x/rollapp/types/state_info.go b/x/rollapp/types/state_info.go index f094160fe..0de6d470e 100644 --- a/x/rollapp/types/state_info.go +++ b/x/rollapp/types/state_info.go @@ -7,7 +7,6 @@ import ( ) func NewStateInfo(rollappId string, newIndex uint64, creator string, startHeight uint64, numBlocks uint64, daPath string, version uint64, height uint64, BDs BlockDescriptors) *StateInfo { - stateInfoIndex := StateInfoIndex{RollappId: rollappId, Index: newIndex} status := STATE_STATUS_RECEIVED return &StateInfo{ @@ -19,8 +18,8 @@ func NewStateInfo(rollappId string, newIndex uint64, creator string, startHeight Version: version, CreationHeight: height, Status: status, - BDs: BDs} - + BDs: BDs, + } } func (s *StateInfo) Finalize() { @@ -32,7 +31,6 @@ func (s *StateInfo) GetIndex() StateInfoIndex { } func (s *StateInfo) GetEvents() []sdk.Attribute { - eventAttributes := []sdk.Attribute{ sdk.NewAttribute(AttributeKeyRollappId, s.StateInfoIndex.RollappId), sdk.NewAttribute(AttributeKeyStateInfoIndex, strconv.FormatUint(s.StateInfoIndex.Index, 10)), diff --git a/x/sequencer/client/cli/tx.go b/x/sequencer/client/cli/tx.go index 799782c2b..f99b480cc 100644 --- a/x/sequencer/client/cli/tx.go +++ b/x/sequencer/client/cli/tx.go @@ -97,7 +97,6 @@ func CmdUnbond() *cobra.Command { Short: "Create a new sequencer for a rollapp", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err diff --git a/x/sequencer/keeper/grpc_query_sequencer.go b/x/sequencer/keeper/grpc_query_sequencer.go index b473e17eb..7bdf30a0d 100644 --- a/x/sequencer/keeper/grpc_query_sequencer.go +++ b/x/sequencer/keeper/grpc_query_sequencer.go @@ -30,7 +30,6 @@ func (k Keeper) Sequencers(c context.Context, req *types.QuerySequencersRequest) sequencers = append(sequencers, sequencer) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/sequencer/keeper/hook_listener.go b/x/sequencer/keeper/hook_listener.go index be232d623..f5b494e78 100644 --- a/x/sequencer/keeper/hook_listener.go +++ b/x/sequencer/keeper/hook_listener.go @@ -55,7 +55,7 @@ func (hook rollapphook) FraudSubmitted(ctx sdk.Context, rollappID string, height return types.ErrUnknownSequencer } - //skip slashing if the sequencer is already jailed + // skip slashing if the sequencer is already jailed if sequencer.Jailed { return nil } diff --git a/x/sequencer/keeper/keeper.go b/x/sequencer/keeper/keeper.go index 6473f15d4..4d26b0374 100644 --- a/x/sequencer/keeper/keeper.go +++ b/x/sequencer/keeper/keeper.go @@ -39,7 +39,6 @@ func NewKeeper( } return &Keeper{ - cdc: cdc, storeKey: storeKey, memKey: memKey, diff --git a/x/sequencer/keeper/msg_server_unbond.go b/x/sequencer/keeper/msg_server_unbond.go index 670d87931..3140f2ac3 100644 --- a/x/sequencer/keeper/msg_server_unbond.go +++ b/x/sequencer/keeper/msg_server_unbond.go @@ -62,7 +62,7 @@ func (k Keeper) setSequencerToUnbonding(ctx sdk.Context, seqAddr string) (time.T k.RotateProposer(ctx, seq.RollappId) } - //TODO: emit an event + // TODO: emit an event return completionTime, nil } diff --git a/x/sequencer/keeper/sequencer.go b/x/sequencer/keeper/sequencer.go index 132533e01..8dbb9b0b0 100644 --- a/x/sequencer/keeper/sequencer.go +++ b/x/sequencer/keeper/sequencer.go @@ -19,7 +19,7 @@ func (k Keeper) SetSequencer(ctx sdk.Context, sequencer types.Sequencer) { seqByrollappKey := types.SequencerByRollappByStatusKey(sequencer.RollappId, sequencer.SequencerAddress, sequencer.Status) store.Set(seqByrollappKey, b) - //To support InitGenesis scenario + // To support InitGenesis scenario if sequencer.Status == types.Unbonding { k.setUnbondingSequencerQueue(ctx, sequencer) } @@ -34,7 +34,7 @@ func (k Keeper) UpdateSequencer(ctx sdk.Context, sequencer types.Sequencer, oldS seqByrollappKey := types.SequencerByRollappByStatusKey(sequencer.RollappId, sequencer.SequencerAddress, sequencer.Status) store.Set(seqByrollappKey, b) - //status changed, need to remove old status key + // status changed, need to remove old status key if sequencer.Status != oldStatus { oldKey := types.SequencerByRollappByStatusKey(sequencer.RollappId, sequencer.SequencerAddress, oldStatus) store.Delete(oldKey) @@ -54,7 +54,7 @@ func (k Keeper) RotateProposer(ctx sdk.Context, rollappId string) { ) return } - //take the next bonded sequencer to be the proposer. sorted by address + // take the next bonded sequencer to be the proposer. sorted by address seq := seqsByRollapp[0] seq.Proposer = true k.UpdateSequencer(ctx, seq, types.Bonded) diff --git a/x/sequencer/keeper/slashing.go b/x/sequencer/keeper/slashing.go index 671a2a23c..d45698867 100644 --- a/x/sequencer/keeper/slashing.go +++ b/x/sequencer/keeper/slashing.go @@ -34,7 +34,7 @@ func (k Keeper) Slashing(ctx sdk.Context, seqAddr string) error { oldStatus := seq.Status wasPropser := seq.Proposer - //in case we are slashing an unbonding sequencer, we need to remove it from the unbonding queue + // in case we are slashing an unbonding sequencer, we need to remove it from the unbonding queue if oldStatus == types.Unbonding { k.removeUnbondingSequencer(ctx, seq) } diff --git a/x/sequencer/module_simulation.go b/x/sequencer/module_simulation.go index 1f6399003..c18c506e7 100644 --- a/x/sequencer/module_simulation.go +++ b/x/sequencer/module_simulation.go @@ -51,7 +51,6 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP // RandomizedParams creates randomized param changes for the simulator func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} } diff --git a/x/sequencer/simulation/create_sequencer.go b/x/sequencer/simulation/create_sequencer.go index db8dd4124..255f93865 100644 --- a/x/sequencer/simulation/create_sequencer.go +++ b/x/sequencer/simulation/create_sequencer.go @@ -91,6 +91,5 @@ func SimulateMsgCreateSequencer( } return simulation.GenAndDeliverMsgWithRandFees(msg, msg.Type(), types.ModuleName, r, app, &ctx, &creatorAccount, bk, ak, nil, bExpectedError) - } } diff --git a/x/sequencer/types/genesis.go b/x/sequencer/types/genesis.go index 4ff125196..c5da5058a 100644 --- a/x/sequencer/types/genesis.go +++ b/x/sequencer/types/genesis.go @@ -20,7 +20,7 @@ func (gs GenesisState) Validate() error { for _, elem := range gs.SequencerList { - //FIXME: should run validation on the sequencer objects + // FIXME: should run validation on the sequencer objects index := string(SequencerKey(elem.SequencerAddress)) if _, ok := sequencerIndexMap[index]; ok { @@ -29,7 +29,7 @@ func (gs GenesisState) Validate() error { sequencerIndexMap[index] = struct{}{} } - //FIXME: validate single PROPOSER per rollapp + // FIXME: validate single PROPOSER per rollapp return gs.Params.Validate() } diff --git a/x/streamer/client/cli/query.go b/x/streamer/client/cli/query.go index cb600f266..3808c8e70 100644 --- a/x/streamer/client/cli/query.go +++ b/x/streamer/client/cli/query.go @@ -35,7 +35,8 @@ func GetCmdToDistributeCoins() (*osmocli.QueryDescriptor, *types.ModuleToDistrib Use: "to-distribute-coins", Short: "Query coins that is going to be distributed", Long: `This command allows you to query the coins that are scheduled to be distributed. - It returns a list of coins with their denominations and amounts.`}, + It returns a list of coins with their denominations and amounts.`, + }, &types.ModuleToDistributeCoinsRequest{} } @@ -46,7 +47,8 @@ func GetCmdStreamByID() (*osmocli.QueryDescriptor, *types.StreamByIDRequest) { Short: "Query stream by id.", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} stream-by-id 1 -`}, &types.StreamByIDRequest{} +`, + }, &types.StreamByIDRequest{} } // GetCmdActiveStreams returns active streams. @@ -56,7 +58,8 @@ func GetCmdActiveStreams() (*osmocli.QueryDescriptor, *types.ActiveStreamsReques Short: "Query active streams", Long: `This command allows you to query all active streams. An active stream is a stream that is currently in progress. - The command returns a list of active streams with their details.`}, + The command returns a list of active streams with their details.`, + }, &types.ActiveStreamsRequest{} } @@ -67,6 +70,7 @@ func GetCmdUpcomingStreams() (*osmocli.QueryDescriptor, *types.UpcomingStreamsRe Short: "Query upcoming streams", Long: `This command allows you to query all upcoming streams. An upcoming stream is a stream that is scheduled to start in the future. - The command returns a list of upcoming streams with their details, including the start time, end time, and the coins it contains.`}, + The command returns a list of upcoming streams with their details, including the start time, end time, and the coins it contains.`, + }, &types.UpcomingStreamsRequest{} } diff --git a/x/streamer/keeper/hooks.go b/x/streamer/keeper/hooks.go index cccc97118..0d884486e 100644 --- a/x/streamer/keeper/hooks.go +++ b/x/streamer/keeper/hooks.go @@ -13,8 +13,10 @@ type Hooks struct { k Keeper } -var _ epochstypes.EpochHooks = Hooks{} -var _ gammtypes.GammHooks = Hooks{} +var ( + _ epochstypes.EpochHooks = Hooks{} + _ gammtypes.GammHooks = Hooks{} +) // Hooks returns the hook wrapper struct. func (k Keeper) Hooks() Hooks { diff --git a/x/streamer/keeper/keeper.go b/x/streamer/keeper/keeper.go index 59365fb88..7078707bc 100644 --- a/x/streamer/keeper/keeper.go +++ b/x/streamer/keeper/keeper.go @@ -58,7 +58,7 @@ func (k Keeper) CreateStream(ctx sdk.Context, coins sdk.Coins, records []types.D return 0, err } - //TODO: it's better to check only the denoms of the requested coins. No need to iterate entire balance. + // TODO: it's better to check only the denoms of the requested coins. No need to iterate entire balance. moduleBalance := k.bk.GetAllBalances(ctx, authtypes.NewModuleAddress(types.ModuleName)) alreadyAllocatedCoins := k.GetModuleToDistributeCoins(ctx) diff --git a/x/streamer/types/genesis.go b/x/streamer/types/genesis.go index e3ba24b3f..1029ef8f0 100644 --- a/x/streamer/types/genesis.go +++ b/x/streamer/types/genesis.go @@ -30,7 +30,7 @@ func (gs GenesisState) Validate() error { return fmt.Errorf("streams length does not match last stream id") } - //validate the streams are sorted and last stream id is correct + // validate the streams are sorted and last stream id is correct for i, stream := range gs.Streams { if stream.Id != uint64(i+1) { return fmt.Errorf("stream in idx %d have wrong streamID (%d)", i, stream.Id) diff --git a/x/streamer/types/proposal_distribution.go b/x/streamer/types/proposal_distribution.go index dc757e6b6..2f1c9de42 100644 --- a/x/streamer/types/proposal_distribution.go +++ b/x/streamer/types/proposal_distribution.go @@ -16,13 +16,14 @@ const ( ) // Assert ReplaceStreamDistributionProposal implements govtypes.Content at compile-time -var _ govtypes.Content = &ReplaceStreamDistributionProposal{} -var _ govtypes.Content = &UpdateStreamDistributionProposal{} +var ( + _ govtypes.Content = &ReplaceStreamDistributionProposal{} + _ govtypes.Content = &UpdateStreamDistributionProposal{} +) func init() { govtypes.RegisterProposalType(ProposalTypeReplaceStreamDistribution) govtypes.RegisterProposalType(ProposalTypeUpdateStreamDistribution) - } // NewReplaceStreamDistributionProposal creates a new ReplaceStreamDistribution proposal. diff --git a/x/streamer/types/proposal_stream.go b/x/streamer/types/proposal_stream.go index f42ef9b3d..a87da81d4 100644 --- a/x/streamer/types/proposal_stream.go +++ b/x/streamer/types/proposal_stream.go @@ -18,13 +18,14 @@ const ( ) // Assert CreateStreamProposal implements govtypes.Content at compile-time -var _ govtypes.Content = &CreateStreamProposal{} -var _ govtypes.Content = &TerminateStreamProposal{} +var ( + _ govtypes.Content = &CreateStreamProposal{} + _ govtypes.Content = &TerminateStreamProposal{} +) func init() { govtypes.RegisterProposalType(ProposalTypeCreateStream) govtypes.RegisterProposalType(ProposalTypeTerminateStream) - } // NewCreateStreamProposal creates a new create stream proposal. From 991ea9bc3e292ea7c217cdc30caf709ec0d4c39e Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Sat, 16 Mar 2024 22:30:37 +0700 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad7b4a0c1..3583e223b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ #### Bug Fixes - (rollapp) [#471](https://github.com/dymensionxyz/dymension/issues/471) Validate rollapp token metadata +- (ibc) [#678](https://github.com/dymensionxyz/dymension/pull/678) apply a pfm patch + ___ All notable changes to this project will be documented in this file. From 1ee9af95e95deadde06b4fda74abe9de8fda9008 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Sat, 16 Mar 2024 22:31:30 +0700 Subject: [PATCH 3/4] correct the changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3583e223b..031708a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ #### Bug Fixes - (rollapp) [#471](https://github.com/dymensionxyz/dymension/issues/471) Validate rollapp token metadata -- (ibc) [#678](https://github.com/dymensionxyz/dymension/pull/678) apply a pfm patch +- (hygene) [#678](https://github.com/dymensionxyz/dymension/pull/676) lint tests ___ From 873ce490a262c40712d513ae350773d227dfc24f Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Sat, 16 Mar 2024 23:32:43 +0700 Subject: [PATCH 4/4] tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c0d89b836..170980221 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/osmosis-labs/osmosis/v15 v15.0.0-00010101000000-000000000000 - github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -159,6 +158,7 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect + github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect