@@ -192,6 +192,26 @@ func (config *TxPoolConfig) sanitize() TxPoolConfig {
192192 log .Warn ("Sanitizing invalid txpool price bump" , "provided" , conf .PriceBump , "updated" , DefaultTxPoolConfig .PriceBump )
193193 conf .PriceBump = DefaultTxPoolConfig .PriceBump
194194 }
195+ if conf .AccountSlots < 1 {
196+ log .Warn ("Sanitizing invalid txpool account slots" , "provided" , conf .AccountSlots , "updated" , DefaultTxPoolConfig .AccountSlots )
197+ conf .AccountSlots = DefaultTxPoolConfig .AccountSlots
198+ }
199+ if conf .GlobalSlots < 1 {
200+ log .Warn ("Sanitizing invalid txpool global slots" , "provided" , conf .GlobalSlots , "updated" , DefaultTxPoolConfig .GlobalSlots )
201+ conf .GlobalSlots = DefaultTxPoolConfig .GlobalSlots
202+ }
203+ if conf .AccountQueue < 1 {
204+ log .Warn ("Sanitizing invalid txpool account queue" , "provided" , conf .AccountQueue , "updated" , DefaultTxPoolConfig .AccountQueue )
205+ conf .AccountQueue = DefaultTxPoolConfig .AccountQueue
206+ }
207+ if conf .GlobalQueue < 1 {
208+ log .Warn ("Sanitizing invalid txpool global queue" , "provided" , conf .GlobalQueue , "updated" , DefaultTxPoolConfig .GlobalQueue )
209+ conf .GlobalQueue = DefaultTxPoolConfig .GlobalQueue
210+ }
211+ if conf .Lifetime < 1 {
212+ log .Warn ("Sanitizing invalid txpool lifetime" , "provided" , conf .Lifetime , "updated" , DefaultTxPoolConfig .Lifetime )
213+ conf .Lifetime = DefaultTxPoolConfig .Lifetime
214+ }
195215 return conf
196216}
197217
0 commit comments