Skip to content

Commit

Permalink
chore: apply zsystem comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Feb 7, 2024
1 parent fcaf830 commit 550365d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion testutil/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// Commit commits a block at a given time. Reminder: At the end of each
// Tendermint Consensus round the following methods are run
// CometBFT Consensus round the following methods are run
// 1. FinalizeBlock
// 2. Commit
func Commit(ctx sdk.Context, app *app.EthermintApp, t time.Duration, vs *tmtypes.ValidatorSet) (sdk.Context, error) {
Expand Down
3 changes: 1 addition & 2 deletions x/evm/keeper/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/evmos/ethermint/x/evm/types"
)
Expand All @@ -37,7 +36,7 @@ func (k Keeper) GetCoinbaseAddress(ctx sdk.Context, proposerAddress sdk.ConsAddr
validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, GetProposerAddress(ctx, proposerAddress))
if err != nil {
return common.Address{}, errorsmod.Wrapf(
stakingtypes.ErrNoValidatorFound,
err,
"failed to retrieve validator from block proposer address %s",
proposerAddress.String(),
)
Expand Down
36 changes: 27 additions & 9 deletions x/evm/migrations/v5/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,34 @@ func MigrateStore(
params.EvmDenom = denom
params.ExtraEIPs = extraEIPs.EIPs
params.ChainConfig = chainConfig
params.EnableCreate, _ = store.Has(types.ParamStoreKeyEnableCreate)
params.EnableCall, _ = store.Has(types.ParamStoreKeyEnableCall)
params.AllowUnprotectedTxs, _ = store.Has(types.ParamStoreKeyAllowUnprotectedTxs)
if params.EnableCreate, err = store.Has(types.ParamStoreKeyEnableCreate); err != nil {
return err
}
if params.EnableCall, err = store.Has(types.ParamStoreKeyEnableCall); err != nil {
return err
}
if params.AllowUnprotectedTxs, err = store.Has(types.ParamStoreKeyAllowUnprotectedTxs); err != nil {
return err
}

_ = store.Delete(types.ParamStoreKeyChainConfig)
_ = store.Delete(types.ParamStoreKeyExtraEIPs)
_ = store.Delete(types.ParamStoreKeyEVMDenom)
_ = store.Delete(types.ParamStoreKeyEnableCreate)
_ = store.Delete(types.ParamStoreKeyEnableCall)
_ = store.Delete(types.ParamStoreKeyAllowUnprotectedTxs)
if err = store.Delete(types.ParamStoreKeyChainConfig); err != nil {
return err
}
if err = store.Delete(types.ParamStoreKeyExtraEIPs); err != nil {
return err
}
if err = store.Delete(types.ParamStoreKeyEVMDenom); err != nil {
return err
}
if err = store.Delete(types.ParamStoreKeyEnableCreate); err != nil {
return err
}
if err = store.Delete(types.ParamStoreKeyEnableCall); err != nil {
return err
}
if err = store.Delete(types.ParamStoreKeyAllowUnprotectedTxs); err != nil {
return err
}

if err := params.Validate(); err != nil {
return err
Expand Down

0 comments on commit 550365d

Please sign in to comment.