@@ -112,7 +112,7 @@ import (
112112 servertypes "github.com/cosmos/cosmos-sdk/server/types"
113113 sdk "github.com/cosmos/cosmos-sdk/types"
114114 sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
115- mempool "github.com/cosmos/cosmos-sdk/types/mempool"
115+ "github.com/cosmos/cosmos-sdk/types/mempool"
116116 "github.com/cosmos/cosmos-sdk/types/module"
117117 "github.com/cosmos/cosmos-sdk/types/msgservice"
118118 sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
@@ -174,6 +174,8 @@ const (
174174 FlagBlockedAddresses = "blocked-addresses"
175175 FlagUnsafeIgnoreBlockListFailure = "unsafe-ignore-block-list-failure"
176176 FlagUnsafeDummyCheckTx = "unsafe-dummy-check-tx"
177+
178+ FlagDisableOptimisticExecution = "cronos.disable-optimistic-execution"
177179)
178180
179181var Forks = []Fork {}
@@ -410,7 +412,7 @@ func New(
410412 })
411413
412414 blockSTMEnabled := cast .ToString (appOpts .Get (srvflags .EVMBlockExecutor )) == "block-stm"
413- optimisticExecutionDisabled := cast .ToString (appOpts .Get (srvflags . EVMOptimisticExecution )) == "disable"
415+ optimisticExecutionDisabled := cast .ToBool (appOpts .Get (FlagDisableOptimisticExecution ))
414416
415417 var cacheSize int
416418 if ! blockSTMEnabled && optimisticExecutionDisabled {
@@ -501,7 +503,6 @@ func New(
501503 panic (err )
502504 }
503505 app .txConfig = txConfig
504- stakingCacheSize := cast .ToInt (appOpts .Get (server .FlagStakingCacheSize ))
505506 app .StakingKeeper = stakingkeeper .NewKeeper (
506507 appCodec ,
507508 runtime .NewKVStoreService (keys [stakingtypes .StoreKey ]),
@@ -510,7 +511,6 @@ func New(
510511 authAddr ,
511512 address .NewBech32Codec (sdk .GetConfig ().GetBech32ValidatorAddrPrefix ()),
512513 address .NewBech32Codec (sdk .GetConfig ().GetBech32ConsensusAddrPrefix ()),
513- stakingCacheSize ,
514514 )
515515 app .MintKeeper = mintkeeper .NewKeeper (
516516 appCodec ,
0 commit comments