Skip to content

Commit 7510bbc

Browse files
committed
sim-lib/refactor: fix naming of consumer channels for clarity
1 parent ac54d1c commit 7510bbc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sim-lib/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,22 +487,22 @@ impl Simulation {
487487
random_activity_nodes.keys().cloned().collect()
488488
};
489489

490-
let producer_senders =
490+
let consumer_channels =
491491
self.dispatch_consumers(collecting_nodes, event_sender.clone(), &mut tasks);
492492

493493
// Next, we'll spin up our actual activity generator that will be responsible for triggering the activity that
494494
// has been configured (if any), passing in the channel that is used to notify data collection that events have
495495
// been generated. Alternatively, we'll generate random activity if there is no activity specified.
496496
if !self.activity.is_empty() {
497-
self.dispatch_activity_producers(producer_senders, &mut tasks)
497+
self.dispatch_activity_producers(consumer_channels, &mut tasks)
498498
.await;
499499
} else {
500500
log::info!(
501501
"Generating random activity with multiplier: {}, average payment amount: {}.",
502502
self.activity_multiplier,
503503
self.expected_payment_msat
504504
);
505-
self.dispatch_random_producers(random_activity_nodes, producer_senders, &mut tasks)
505+
self.dispatch_random_producers(random_activity_nodes, consumer_channels, &mut tasks)
506506
.await?;
507507
}
508508

@@ -670,7 +670,7 @@ impl Simulation {
670670
async fn dispatch_random_producers(
671671
&self,
672672
node_capacities: HashMap<PublicKey, (NodeInfo, u64)>,
673-
producer_channels: HashMap<PublicKey, Sender<SimulationEvent>>,
673+
consumer_channels: HashMap<PublicKey, Sender<SimulationEvent>>,
674674
tasks: &mut JoinSet<()>,
675675
) -> Result<(), SimulationError> {
676676
let network_generator = Arc::new(Mutex::new(
@@ -683,7 +683,7 @@ impl Simulation {
683683
network_generator.lock().await
684684
);
685685

686-
for (pk, sender) in producer_channels.into_iter() {
686+
for (pk, sender) in consumer_channels.into_iter() {
687687
let (info, source_capacity) = match node_capacities.get(&pk) {
688688
Some((info, capacity)) => (info.clone(), *capacity),
689689
None => {

0 commit comments

Comments
 (0)