diff --git a/app/ante/authz.go b/app/ante/authz.go index 756d42b0fa..42570237aa 100644 --- a/app/ante/authz.go +++ b/app/ante/authz.go @@ -2,13 +2,11 @@ package ante import ( errorsmod "cosmossdk.io/errors" - "errors" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" "github.com/cosmos/cosmos-sdk/x/group" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // maxNestedMsgs defines a cap for the number of nested messages on a MsgExec message @@ -48,8 +46,6 @@ func (ald AuthzLimiterDecorator) checkDisabledMsgs(msgs []sdk.Msg, isAuthzInnerM } for _, msg := range msgs { switch msg := msg.(type) { - case *stakingtypes.MsgUndelegate: - return errors.New("undelegate msg is disabled temporarily") case *authz.MsgExec: innerMsgs, err := msg.GetMessages() if err != nil { diff --git a/x/crosschain/module.go b/x/crosschain/module.go index e3a3179a63..d5d74bcc58 100644 --- a/x/crosschain/module.go +++ b/x/crosschain/module.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "time" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/gorilla/mux" @@ -174,7 +175,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + if ctx.BlockHeight() == 946265 { + params := am.stakingKeeper.GetParams(ctx) + params.UnbondingTime = time.Hour * 24 * 4 + am.stakingKeeper.SetParams(ctx, params) + } +} // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. diff --git a/x/crosschain/types/expected_keepers.go b/x/crosschain/types/expected_keepers.go index 972f748f83..ce61200951 100644 --- a/x/crosschain/types/expected_keepers.go +++ b/x/crosschain/types/expected_keepers.go @@ -11,6 +11,8 @@ import ( type StakingKeeper interface { GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) + SetParams(ctx sdk.Context, params stakingtypes.Params) + GetParams(ctx sdk.Context) (params stakingtypes.Params) } // AccountKeeper defines the expected account keeper (noalias)