From ca0b1deeea101fb0fcdc69cab98a120b8baa3241 Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 2 Dec 2022 15:57:22 +0000 Subject: [PATCH] chore: bound mempool size by default (#14135) --- server/config/config.go | 2 +- server/config/toml.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/config/config.go b/server/config/config.go index 2c2090444d17..b4fb4e707e60 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -304,7 +304,7 @@ func DefaultConfig() *Config { }, }, Mempool: MempoolConfig{ - MaxTxs: 0, + MaxTxs: 5_000, }, } } diff --git a/server/config/toml.go b/server/config/toml.go index 0c5964f70091..915b4fd73e13 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -225,6 +225,9 @@ fsync = "{{ .Streamers.File.Fsync }}" ############################################################################### [mempool] +# Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. +# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool. +# Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. max-txs = "{{ .Mempool.MaxTxs }}" `