forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server/v2/cometbft): wire mempool config (cosmos#21741)
- Loading branch information
1 parent
f348d84
commit 52ba264
Showing
9 changed files
with
80 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package mempool | ||
|
||
// Config defines the configurations for the SDK built-in app-side mempool | ||
// implementations. | ||
var DefaultMaxTx = -1 | ||
|
||
// Config defines the configurations for the SDK built-in app-side mempool implementations. | ||
type Config struct { | ||
// MaxTxs defines the behavior of the mempool. A negative value indicates | ||
// the mempool is disabled entirely, zero indicates that the mempool is | ||
// unbounded in how many txs it may contain, and a positive value indicates | ||
// the maximum amount of txs it may contain. | ||
MaxTxs int `mapstructure:"max-txs"` | ||
// MaxTxs defines the maximum number of transactions that can be in the mempool. | ||
MaxTxs int `mapstructure:"max-txs" toml:"max-txs" comment:"max-txs defines the maximum number of transactions that can be in the mempool. A value of 0 indicates an unbounded mempool, a negative value disables the app-side mempool."` | ||
} | ||
|
||
// DefaultConfig returns a default configuration for the SDK built-in app-side mempool implementations. | ||
func DefaultConfig() Config { | ||
return Config{ | ||
MaxTxs: DefaultMaxTx, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
/* | ||
The mempool package defines a few mempool services which can be used in conjunction with your consensus implementation | ||
*/ | ||
|
||
// Package mempool defines a few mempool services which can be used in conjunction with your consensus implementation. | ||
package mempool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters