|
|
|
@ -172,6 +172,26 @@ func (config *TxPoolConfig) sanitize() TxPoolConfig { |
|
|
|
|
log.Warn("Sanitizing invalid txpool price bump", "provided", conf.PriceBump, "updated", DefaultTxPoolConfig.PriceBump) |
|
|
|
|
conf.PriceBump = DefaultTxPoolConfig.PriceBump |
|
|
|
|
} |
|
|
|
|
if conf.AccountSlots < 1 { |
|
|
|
|
log.Warn("Sanitizing invalid txpool account slots", "provided", conf.AccountSlots, "updated", DefaultTxPoolConfig.AccountSlots) |
|
|
|
|
conf.AccountSlots = DefaultTxPoolConfig.AccountSlots |
|
|
|
|
} |
|
|
|
|
if conf.GlobalSlots < 1 { |
|
|
|
|
log.Warn("Sanitizing invalid txpool global slots", "provided", conf.GlobalSlots, "updated", DefaultTxPoolConfig.GlobalSlots) |
|
|
|
|
conf.GlobalSlots = DefaultTxPoolConfig.GlobalSlots |
|
|
|
|
} |
|
|
|
|
if conf.AccountQueue < 1 { |
|
|
|
|
log.Warn("Sanitizing invalid txpool account queue", "provided", conf.AccountQueue, "updated", DefaultTxPoolConfig.AccountQueue) |
|
|
|
|
conf.AccountQueue = DefaultTxPoolConfig.AccountQueue |
|
|
|
|
} |
|
|
|
|
if conf.GlobalQueue < 1 { |
|
|
|
|
log.Warn("Sanitizing invalid txpool global queue", "provided", conf.GlobalQueue, "updated", DefaultTxPoolConfig.GlobalQueue) |
|
|
|
|
conf.GlobalQueue = DefaultTxPoolConfig.GlobalQueue |
|
|
|
|
} |
|
|
|
|
if conf.Lifetime < 1 { |
|
|
|
|
log.Warn("Sanitizing invalid txpool lifetime", "provided", conf.Lifetime, "updated", DefaultTxPoolConfig.Lifetime) |
|
|
|
|
conf.Lifetime = DefaultTxPoolConfig.Lifetime |
|
|
|
|
} |
|
|
|
|
return conf |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|