Skip to content

Commit

Permalink
feat: add tx limit to mempool (cosmos#14014)
Browse files Browse the repository at this point in the history
* feat: add bounding max tx to mempool

* add bounded condition

* sligh improvement on generator

* remove unbouded option

* add test

* added mempool options mechanism

* mising test

* seting mempool

* change function name

* change function name

* failing test

* Revert "failing test"

This reverts commit d527982.

* fix import block

* changelog entries

* add ability to do unbounded mempool

* remove unesesary variable

* small comments

* change 0 to mean unbounded

* t

* small test fix

* add the ability to be bounded unbounded and disabled

* t

* set default maxtx

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* example for opts

* remove superflues logs entry

* add mempool to configurations

* fix more understandable name

* remove table in favor of bulletpoints

* sender nonce to unbounded

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update types/mempool/sender_nonce.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update types/mempool/sender_nonce.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update server/config/config.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* t

* add comment for options

* fix inport

* fix inport

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Emmanuel T Odeke <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2022
1 parent 960c6cf commit 3b9ae01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
snapshottypes "github.com/cosmos/cosmos-sdk/store/snapshots/types"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/mempool"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down Expand Up @@ -307,6 +308,7 @@ func newApp(
baseapp.SetSnapshot(snapshotStore, snapshotOptions),
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))),
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode))),
baseapp.SetMempool(mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs))))),
)
}

Expand Down

0 comments on commit 3b9ae01

Please sign in to comment.