Repository: paradigmxyz/reth (language: rust)

Issue:
extract TransactionsManagerConfig creation
### Describe the feature

we can extract this into a standalone function on self:

https://github.com/paradigmxyz/reth/blob/86e8a2a245490a1503c3c05c246f63f3d48e0175/crates/node/core/src/args/network.rs#L219-L230

so that this becomes `let transactions_manager_config = self.transaction_manager_config()`

### Additional context

_No response_


Discussion / hints:
May I take this up?

Fix patch:
diff --git a/crates/node/core/src/args/network.rs b/crates/node/core/src/args/network.rs
index d97ba2fafe6a..898592d43927 100644
--- a/crates/node/core/src/args/network.rs
+++ b/crates/node/core/src/args/network.rs
@@ -184,6 +184,20 @@ impl NetworkArgs {
             bootnodes.into_iter().filter_map(|node| node.resolve_blocking().ok()).collect()
         })
     }
+    /// Configures and returns a `TransactionsManagerConfig` based on the current settings.
+    pub fn transactions_manager_config(&self) -> TransactionsManagerConfig {
+        TransactionsManagerConfig {
+            transaction_fetcher_config: TransactionFetcherConfig::new(
+                self.max_concurrent_tx_requests,
+                self.max_concurrent_tx_requests_per_peer,
+                self.soft_limit_byte_size_pooled_transactions_response,
+                self.soft_limit_byte_size_pooled_transactions_response_on_pack_request,
+                self.max_capacity_cache_txns_pending_fetch,
+            ),
+            max_transactions_seen_by_peer_history: self.max_seen_tx_history,
+            propagation_mode: Default::default(),
+        }
+    }
 
     /// Build a [`NetworkConfigBuilder`] from a [`Config`] and a [`EthChainSpec`], in addition to
     /// the values in this option struct.
@@ -216,19 +230,6 @@ impl NetworkArgs {
             .with_max_inbound_opt(self.max_inbound_peers)
             .with_max_outbound_opt(self.max_outbound_peers);
 
-        // Configure transactions manager
-        let transactions_manager_config = TransactionsManagerConfig {
-            transaction_fetcher_config: TransactionFetcherConfig::new(
-                self.max_concurrent_tx_requests,
-                self.max_concurrent_tx_requests_per_peer,
-                self.soft_limit_byte_size_pooled_transactions_response,
-                self.soft_limit_byte_size_pooled_transactions_response_on_pack_request,
-                self.max_capacity_cache_txns_pending_fetch,
-            ),
-            max_transactions_seen_by_peer_history: self.max_seen_tx_history,
-            propagation_mode: Default::default(),
-        };
-
         // Configure basic network stack
         NetworkConfigBuilder::<N>::new(secret_key)
             .peer_config(config.peers_config_with_basic_nodes_from_file(
@@ -240,7 +241,7 @@ impl NetworkArgs {
             )
             .peer_config(peers_config)
             .boot_nodes(chain_bootnodes.clone())
-            .transactions_manager_config(transactions_manager_config)
+            .transactions_manager_config(self.transactions_manager_config())
             // Configure node identity
             .apply(|builder| {
                 let peer_id = builder.get_peer_id();


Test patch: