Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove unused code #681

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,6 @@ func NewAppKeeper(
// appKeepers.tkeys[feemarkettypes.TransientKey],
appKeepers.GetSubspace(feemarkettypes.ModuleName),
)
allKeys := make(map[string]storetypes.StoreKey, len(appKeepers.keys)+len(appKeepers.tkeys)+len(appKeepers.memKeys)+len(appKeepers.objKeys))
for k, v := range appKeepers.keys {
allKeys[k] = v
}
for k, v := range appKeepers.tkeys {
allKeys[k] = v
}
for k, v := range appKeepers.memKeys {
allKeys[k] = v
}
for k, v := range appKeepers.objKeys {
allKeys[k] = v
}

// cross chain precompile
precompileRouter := crosschainprecompile.NewRouter()
Expand Down
1 change: 0 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ func queryCommand() *cobra.Command {
authcmd.QueryTxCmd(),
authcmd.QueryTxsByEventsCmd(),
rpc.ValidatorCommand(),
rpc.QueryEventForTxCmd(),
rpc.WaitTxCmd(),
sdkserver.QueryBlocksCmd(),
sdkserver.QueryBlockCmd(),
Expand Down
33 changes: 0 additions & 33 deletions proto/fx/staking/v1/tx.proto

This file was deleted.

23 changes: 0 additions & 23 deletions x/staking/module.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
package staking

import (
"context"

"cosmossdk.io/core/appmodule"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/cosmos/cosmos-sdk/x/staking/exported"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/functionx/fx-core/v8/x/staking/keeper"
fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types"
)

var (
Expand All @@ -30,20 +25,9 @@ type AppModuleBasic struct {
staking.AppModuleBasic
}

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
stakingtypes.RegisterLegacyAminoCodec(cdc)
fxstakingtypes.RegisterLegacyAminoCodec(cdc)
}

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
stakingtypes.RegisterInterfaces(registry)
fxstakingtypes.RegisterInterfaces(registry)
}

type AppModule struct {
staking.AppModule
AppModuleBasic AppModuleBasic
Keeper *keeper.Keeper
}

// NewAppModule creates a new AppModule object
Expand All @@ -52,12 +36,5 @@ func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper, ak stakingtypes.Accoun
return AppModule{
AppModuleBasic: AppModuleBasic{AppModuleBasic: stakingAppModule.AppModuleBasic},
AppModule: stakingAppModule,
Keeper: keeper,
}
}

// EndBlock returns the end blocker for the staking module. It returns no validator
// updates.
func (am AppModule) EndBlock(ctx context.Context) ([]abci.ValidatorUpdate, error) {
return am.Keeper.EndBlocker(ctx)
}
22 changes: 0 additions & 22 deletions x/staking/types/codec.go

This file was deleted.

12 changes: 0 additions & 12 deletions x/staking/types/events.go

This file was deleted.

3 changes: 2 additions & 1 deletion x/staking/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (
)

var (
AllowanceKey = []byte{0x90}
AllowanceKey = []byte{0x90}
// todo: remove this key in migrate v8
ValidatorOperatorKey = []byte{0x91}
ConsensusPubKey = []byte{0x92}
ConsensusProcessKey = []byte{0x93}
Expand Down
Loading