From 33c456d7609f169b518d9d2fbd66f7013bb99daf Mon Sep 17 00:00:00 2001 From: Carla Kirk-Cohen Date: Fri, 17 Nov 2023 15:15:50 -0500 Subject: [PATCH] sim-lib/refactor: fix naming of consumer channels for clarity --- sim-lib/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sim-lib/src/lib.rs b/sim-lib/src/lib.rs index fe2e15ef..e97078d5 100644 --- a/sim-lib/src/lib.rs +++ b/sim-lib/src/lib.rs @@ -482,14 +482,14 @@ impl Simulation { random_activity_nodes.keys().cloned().collect() }; - let producer_senders = + let consumer_channels = self.dispatch_consumers(collecting_nodes, event_sender.clone(), &mut tasks); // Next, we'll spin up our actual activity generator that will be responsible for triggering the activity that // has been configured (if any), passing in the channel that is used to notify data collection that events have // been generated. Alternatively, we'll generate random activity if there is no activity specified. if !self.activity.is_empty() { - self.dispatch_activity_producers(producer_senders, &mut tasks) + self.dispatch_activity_producers(consumer_channels, &mut tasks) .await; } else { log::info!( @@ -497,7 +497,7 @@ impl Simulation { self.activity_multiplier, self.expected_payment_msat ); - self.dispatch_random_producers(random_activity_nodes, producer_senders, &mut tasks) + self.dispatch_random_producers(random_activity_nodes, consumer_channels, &mut tasks) .await?; } @@ -666,7 +666,7 @@ impl Simulation { async fn dispatch_random_producers( &self, node_capacities: HashMap, - producer_channels: HashMap>, + consumer_channels: HashMap>, tasks: &mut JoinSet<()>, ) -> Result<(), SimulationError> { let network_generator = Arc::new(Mutex::new( @@ -679,7 +679,7 @@ impl Simulation { network_generator.lock().await ); - for (pk, sender) in producer_channels.into_iter() { + for (pk, sender) in consumer_channels.into_iter() { let (info, source_capacity) = match node_capacities.get(&pk) { Some((info, capacity)) => (info.clone(), *capacity), None => {