Skip to content

Commit 42e1141

Browse files
authored
fix: evm mempool should be disabled if max-txs < 0 (#734)
* fix: evm mempool should be disabled if max-txs < 0 * Update CHANGELOG.md
1 parent 6921258 commit 42e1141

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
- [\#709](https://github.com/cosmos/evm/pull/709) Fix mempool e2e test
6565
- [\#710](https://github.com/cosmos/evm/pull/710) Fix EoA-CA Identification logic
6666
- [\#711](https://github.com/cosmos/evm/pull/711) Add debug_traceCall api
67+
- [\#734](https://github.com/cosmos/evm/pull/734) Disable evm mempool if max-txs set to -1.
6768

6869

6970
### FEATURES

evmd/mempool.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ func (app *EVMD) configureEVMMempool(appOpts servertypes.AppOptions, logger log.
2121
return nil
2222
}
2323

24+
cosmosPoolMaxTx := evmconfig.GetCosmosPoolMaxTx(appOpts, logger)
25+
if cosmosPoolMaxTx < 0 {
26+
logger.Debug("app-side mempool is disabled, skipping evm mempool configuration")
27+
return nil
28+
}
29+
2430
mempoolConfig, err := app.createMempoolConfig(appOpts, logger)
2531
if err != nil {
2632
return fmt.Errorf("failed to get mempool config: %w", err)
2733
}
28-
cosmosPoolMaxTx := evmconfig.GetCosmosPoolMaxTx(appOpts, logger)
2934

3035
evmMempool := evmmempool.NewExperimentalEVMMempool(
3136
app.CreateQueryContext,

0 commit comments

Comments
 (0)