CLI flag to configure tx ban duration (#11786)

* add tx-ban-seconds

* fix

* trigger CI

* trigger CI

* remove test print

* Update client/cli/src/params/transaction_pool_params.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Xiliang Chen
2022-07-12 23:19:13 +12:00
committed by GitHub
parent a1c60f0909
commit 47b27c292f
7 changed files with 31 additions and 7 deletions
@@ -125,6 +125,7 @@ impl<B: ChainApi> ValidatedPool<B> {
/// Create a new transaction pool.
pub fn new(options: Options, is_validator: IsValidator, api: Arc<B>) -> Self {
let base_pool = base::BasePool::new(options.reject_future_transactions);
let ban_time = options.ban_time;
Self {
is_validator,
options,
@@ -132,7 +133,7 @@ impl<B: ChainApi> ValidatedPool<B> {
api,
pool: RwLock::new(base_pool),
import_notification_sinks: Default::default(),
rotator: Default::default(),
rotator: PoolRotator::new(ban_time),
}
}