replaced generic to box dyn (#9443)

This commit is contained in:
Luca Provini
2024-07-12 16:15:23 +02:00
committed by GitHub
parent b4363e2b48
commit a617bd0f3b
10 changed files with 94 additions and 79 deletions

View File

@ -478,7 +478,7 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
}
/// Creates the [`NetworkBuilder`] for the node.
pub async fn network_builder(&self) -> eyre::Result<NetworkBuilder<Node::Provider, (), ()>> {
pub async fn network_builder(&self) -> eyre::Result<NetworkBuilder<(), ()>> {
let network_config = self.network_config()?;
let builder = NetworkManager::builder(network_config).await?;
Ok(builder)
@ -488,11 +488,7 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
///
/// Spawns the configured network and associated tasks and returns the [`NetworkHandle`]
/// connected to that network.
pub fn start_network<Pool>(
&self,
builder: NetworkBuilder<Node::Provider, (), ()>,
pool: Pool,
) -> NetworkHandle
pub fn start_network<Pool>(&self, builder: NetworkBuilder<(), ()>, pool: Pool) -> NetworkHandle
where
Pool: TransactionPool + Unpin + 'static,
{

View File

@ -49,7 +49,7 @@ pub trait RethNetworkConfig {
// TODO add more network config methods here
}
impl<C> RethNetworkConfig for reth_network::NetworkManager<C> {
impl RethNetworkConfig for reth_network::NetworkManager {
fn add_rlpx_sub_protocol(&mut self, protocol: impl IntoRlpxSubProtocol) {
Self::add_rlpx_sub_protocol(self, protocol);
}