pub struct TxPoolConfig {
pub max_tx_pool_size: usize,
pub min_fee_rate: FeeRate,
pub min_rbf_rate: FeeRate,
pub max_tx_verify_cycles: Cycle,
pub max_ancestors_count: usize,
pub keep_rejected_tx_hashes_days: u8,
pub keep_rejected_tx_hashes_count: u64,
pub persisted_data: PathBuf,
pub recent_reject: PathBuf,
pub expiry_hours: u8,
}
Expand description
Transaction pool configuration
Fields§
§max_tx_pool_size: usize
Keep the transaction pool below <max_tx_pool_size> mb
min_fee_rate: FeeRate
txs with lower fee rate than this will not be relayed or be mined
min_rbf_rate: FeeRate
txs need to pay larger fee rate than this for RBF
max_tx_verify_cycles: Cycle
tx pool rejects txs that cycles greater than max_tx_verify_cycles
max_ancestors_count: usize
max ancestors size limit for a single tx
keep_rejected_tx_hashes_days: u8
rejected tx time to live by days
keep_rejected_tx_hashes_count: u64
rejected tx count limit
persisted_data: PathBuf
The file to persist the tx pool on the disk when tx pool have been shutdown.
By default, it is a subdirectory of ‘tx-pool’ subdirectory under the data directory.
recent_reject: PathBuf
The recent reject record database directory path.
By default, it is a subdirectory of ‘tx-pool’ subdirectory under the data directory.
expiry_hours: u8
The expiration time for pool transactions in hours
Implementations§
Source§impl TxPoolConfig
impl TxPoolConfig
Sourcepub fn adjust<P: AsRef<Path>>(&mut self, root_dir: &Path, tx_pool_dir: P)
pub fn adjust<P: AsRef<Path>>(&mut self, root_dir: &Path, tx_pool_dir: P)
Canonicalizes paths in the config options.
If self.persisted_data
is not set, set it to data_dir / tx_pool_persisted_data
.
If self.path
is relative, convert them to absolute path using
root_dir
as current working directory.
Trait Implementations§
Source§impl Clone for TxPoolConfig
impl Clone for TxPoolConfig
Source§fn clone(&self) -> TxPoolConfig
fn clone(&self) -> TxPoolConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TxPoolConfig
impl Debug for TxPoolConfig
Source§impl Default for TxPoolConfig
impl Default for TxPoolConfig
Auto Trait Implementations§
impl Freeze for TxPoolConfig
impl RefUnwindSafe for TxPoolConfig
impl Send for TxPoolConfig
impl Sync for TxPoolConfig
impl Unpin for TxPoolConfig
impl UnwindSafe for TxPoolConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more