From 5d3c3062e18fb874ccbc5283a2e5c096e74ab382 Mon Sep 17 00:00:00 2001 From: Rostislav Rumenov Date: Tue, 21 Jan 2025 10:52:28 +0000 Subject: [PATCH] . --- rs/replica/setup_ic_network/src/lib.rs | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/rs/replica/setup_ic_network/src/lib.rs b/rs/replica/setup_ic_network/src/lib.rs index 6d8f8b9fb99..89cf29c6e53 100644 --- a/rs/replica/setup_ic_network/src/lib.rs +++ b/rs/replica/setup_ic_network/src/lib.rs @@ -211,20 +211,12 @@ impl AbortableBroadcastChannels { rt_handle: &tokio::runtime::Handle, node_id: NodeId, subnet_id: SubnetId, - artifact_pool_config: ArtifactPoolConfig, - catch_up_package: &CatchUpPackage, state_reader: Arc>, message_router: Arc, consensus_pool: Arc>, time_source: Arc, - ) -> (Self, ArtifactPools, AbortableBroadcastChannelBuilder) { - let artifact_pools = ArtifactPools::new( - log, - metrics_registry, - node_id, - artifact_pool_config, - catch_up_package, - ); + artifact_pools: &ArtifactPools, + ) -> (Self, AbortableBroadcastChannelBuilder) { let consensus_pool_cache = consensus_pool.read().unwrap().get_cache(); let consensus_block_cache = consensus_pool.read().unwrap().get_block_cache(); let bouncers = Bouncers::new( @@ -340,7 +332,6 @@ impl AbortableBroadcastChannels { https_outcalls_outbound_tx, https_outcalls_inbound_rx, }, - artifact_pools, new_p2p_consensus, ) } @@ -392,20 +383,26 @@ pub fn setup_consensus_and_p2p( ) { let time_source = Arc::new(SysTimeSource::new()); let consensus_pool_cache = consensus_pool.read().unwrap().get_cache(); + let artifact_pools = ArtifactPools::new( + log, + metrics_registry, + node_id, + artifact_pool_config, + &catch_up_package, + ); // Start the IO components (a.k.a. P2P) - let (channels, artifact_pools, p2p_builder) = AbortableBroadcastChannels::new( + let (channels, p2p_builder) = AbortableBroadcastChannels::new( log, metrics_registry, rt_handle, node_id, subnet_id, - artifact_pool_config, - &catch_up_package, state_reader.clone(), message_router.clone(), consensus_pool.clone(), time_source.clone(), + &artifact_pools, ); // StateSync receive side + handler definition