transaction_pool/
options.rs

1// Copyright 2020 Parity Technologies
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9/// Transaction Pool options.
10#[derive(Clone, Debug, PartialEq)]
11pub struct Options {
12	/// Maximal number of transactions in the pool.
13	pub max_count: usize,
14	/// Maximal number of transactions from single sender.
15	pub max_per_sender: usize,
16	/// Maximal memory usage.
17	pub max_mem_usage: usize,
18}
19
20impl Default for Options {
21	fn default() -> Self {
22		Options { max_count: 1024, max_per_sender: 16, max_mem_usage: 8 * 1024 * 1024 }
23	}
24}