mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
CLI parameter to specify the broadcast channel capacity of PendingPool (#12388)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -27,6 +27,9 @@ pub const DEFAULT_PRICE_BUMP: u128 = 10;
|
||||
/// This enforces that a blob transaction requires a 100% price bump to be replaced
|
||||
pub const REPLACE_BLOB_PRICE_BUMP: u128 = 100;
|
||||
|
||||
/// Default maximum new transactions for broadcasting.
|
||||
pub const MAX_NEW_PENDING_TXS_NOTIFICATIONS: usize = 200;
|
||||
|
||||
/// Configuration options for the Transaction pool.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PoolConfig {
|
||||
@ -53,6 +56,8 @@ pub struct PoolConfig {
|
||||
pub pending_tx_listener_buffer_size: usize,
|
||||
/// Bound on number of new transactions from `reth_network::TransactionsManager` to buffer.
|
||||
pub new_tx_listener_buffer_size: usize,
|
||||
/// How many new pending transactions to buffer and send iterators in progress.
|
||||
pub max_new_pending_txs_notifications: usize,
|
||||
}
|
||||
|
||||
impl PoolConfig {
|
||||
@ -80,6 +85,7 @@ impl Default for PoolConfig {
|
||||
local_transactions_config: Default::default(),
|
||||
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
||||
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
||||
max_new_pending_txs_notifications: MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,9 +166,9 @@ pub use crate::{
|
||||
blobstore::{BlobStore, BlobStoreError},
|
||||
config::{
|
||||
LocalTransactionConfig, PoolConfig, PriceBumpConfig, SubPoolLimit, DEFAULT_PRICE_BUMP,
|
||||
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, REPLACE_BLOB_PRICE_BUMP,
|
||||
TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER, TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT,
|
||||
TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
||||
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||
REPLACE_BLOB_PRICE_BUMP, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||
TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT, TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
||||
},
|
||||
error::PoolResult,
|
||||
ordering::{CoinbaseTipOrdering, Priority, TransactionOrdering},
|
||||
|
||||
Reference in New Issue
Block a user