mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
Make transaction manager param configurable from cli (#6594)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com> Co-authored-by: Bjerg <onbjerg@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -23,7 +23,10 @@ use reth_db::{
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
};
|
||||
use reth_interfaces::p2p::either::EitherDownloader;
|
||||
use reth_network::{NetworkBuilder, NetworkEvents, NetworkHandle};
|
||||
use reth_network::{
|
||||
transactions::{TransactionFetcherConfig, TransactionsManagerConfig},
|
||||
NetworkBuilder, NetworkEvents, NetworkHandle,
|
||||
};
|
||||
use reth_node_core::{
|
||||
cli::config::{PayloadBuilderConfig, RethRpcConfig, RethTransactionPoolConfig},
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
@@ -731,8 +734,20 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
|
||||
where
|
||||
Pool: TransactionPool + Unpin + 'static,
|
||||
{
|
||||
let (handle, network, txpool, eth) =
|
||||
builder.transactions(pool).request_handler(self.provider().clone()).split_with_handle();
|
||||
let (handle, network, txpool, eth) = builder
|
||||
.transactions(
|
||||
pool,
|
||||
TransactionsManagerConfig {
|
||||
transaction_fetcher_config: TransactionFetcherConfig::new(
|
||||
self.config.network.soft_limit_byte_size_pooled_transactions_response,
|
||||
self.config
|
||||
.network
|
||||
.soft_limit_byte_size_pooled_transactions_response_on_pack_request,
|
||||
),
|
||||
},
|
||||
)
|
||||
.request_handler(self.provider().clone())
|
||||
.split_with_handle();
|
||||
|
||||
self.executor.spawn_critical("p2p txpool", txpool);
|
||||
self.executor.spawn_critical("p2p eth request handler", eth);
|
||||
|
||||
Reference in New Issue
Block a user