Skip to content

Commit

Permalink
add default
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 4, 2024
1 parent fc2fe81 commit e9b84b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
evmtypes "github.com/evmos/ethermint/x/evm/types"
)

func (app *EthermintApp) RegisterUpgradeHandlers() {
Expand All @@ -34,7 +35,7 @@ func (app *EthermintApp) RegisterUpgradeHandlers() {
sdkCtx := sdk.UnwrapSDKContext(ctx)
{
params := app.EvmKeeper.GetParams(sdkCtx)
params.HeaderHashNum = 10000
params.HeaderHashNum = evmtypes.DefaultHeaderHashNum
if err := app.EvmKeeper.SetParams(sdkCtx, params); err != nil {
return m, err
}
Expand Down
3 changes: 3 additions & 0 deletions x/evm/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ var (
DefaultEnableCreate = true
// DefaultEnableCall enables contract calls (i.e true)
DefaultEnableCall = true
// DefaultHeaderHashNum defines the default number of header hash to persist.
DefaultHeaderHashNum = uint64(10000)
)

// NewParams creates a new Params instance
Expand All @@ -58,6 +60,7 @@ func DefaultParams() Params {
EnableCall: DefaultEnableCall,
ChainConfig: config,
AllowUnprotectedTxs: DefaultAllowUnprotectedTxs,
HeaderHashNum: DefaultHeaderHashNum,
}
}

Expand Down

0 comments on commit e9b84b9

Please sign in to comment.