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:
@ -9,9 +9,9 @@ use reth_transaction_pool::{
|
||||
pool::{NEW_TX_LISTENER_BUFFER_SIZE, PENDING_TX_LISTENER_BUFFER_SIZE},
|
||||
validate::DEFAULT_MAX_TX_INPUT_BYTES,
|
||||
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,
|
||||
};
|
||||
/// Parameters for debugging purposes
|
||||
#[derive(Debug, Clone, Args, PartialEq, Eq)]
|
||||
@ -86,6 +86,11 @@ pub struct TxPoolArgs {
|
||||
/// Maximum number of new transactions to buffer
|
||||
#[arg(long = "txpool.max-new-txns", alias = "txpool.max_new_txns", default_value_t = NEW_TX_LISTENER_BUFFER_SIZE)]
|
||||
pub new_tx_listener_buffer_size: usize,
|
||||
|
||||
/// How many new pending transactions to buffer and send to in progress pending transaction
|
||||
/// iterators.
|
||||
#[arg(long = "txpool.max-new-pending-txs-notifications", alias = "txpool.max-new-pending-txs-notifications", default_value_t = MAX_NEW_PENDING_TXS_NOTIFICATIONS)]
|
||||
pub max_new_pending_txs_notifications: usize,
|
||||
}
|
||||
|
||||
impl Default for TxPoolArgs {
|
||||
@ -110,6 +115,7 @@ impl Default for TxPoolArgs {
|
||||
additional_validation_tasks: DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS,
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -148,6 +154,7 @@ impl RethTransactionPoolConfig for TxPoolArgs {
|
||||
gas_limit: self.gas_limit,
|
||||
pending_tx_listener_buffer_size: self.pending_tx_listener_buffer_size,
|
||||
new_tx_listener_buffer_size: self.new_tx_listener_buffer_size,
|
||||
max_new_pending_txs_notifications: self.max_new_pending_txs_notifications,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user