Skip to content

Commit

Permalink
Add disable tx gossip flag for txpool standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw109550 committed Jun 21, 2023
1 parent 02d617b commit 2ce47e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/txpool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ var (
accountSlots uint64
priceBump uint64

optimism bool
optimism bool
noTxGossip bool

commitEvery time.Duration
)
Expand All @@ -79,6 +80,7 @@ func init() {
rootCmd.PersistentFlags().Uint64Var(&priceBump, "txpool.pricebump", txpoolcfg.DefaultConfig.PriceBump, "Price bump percentage to replace an already existing transaction")
rootCmd.PersistentFlags().DurationVar(&commitEvery, utils.TxPoolCommitEveryFlag.Name, utils.TxPoolCommitEveryFlag.Value, utils.TxPoolCommitEveryFlag.Usage)
rootCmd.PersistentFlags().BoolVar(&optimism, "txpool.optimism", txpoolcfg.DefaultConfig.Optimism, "Enable Optimism Bedrock to make txpool account for L1 cost of transactions")
rootCmd.PersistentFlags().BoolVar(&noTxGossip, "txpool.disabletxpoolgossip", txpoolcfg.DefaultConfig.NoTxGossip, "Disable transaction pool gossip")
rootCmd.Flags().StringSliceVar(&traceSenders, utils.TxPoolTraceSendersFlag.Name, []string{}, utils.TxPoolTraceSendersFlag.Usage)
}

Expand Down Expand Up @@ -147,6 +149,8 @@ func doTxpool(ctx context.Context) error {
cfg.MinFeeCap = priceLimit
cfg.AccountSlots = accountSlots
cfg.PriceBump = priceBump
cfg.Optimism = optimism
cfg.NoTxGossip = noTxGossip

cacheConfig := kvcache.DefaultCoherentConfig
cacheConfig.MetricsLabel = "txpool"
Expand Down

0 comments on commit 2ce47e3

Please sign in to comment.