From 30d0bad175b06337bb02bd229887270b45c632da Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 9 Oct 2023 23:38:39 -0400 Subject: [PATCH] Add extra assert to coordinator --- coordinator/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coordinator/src/main.rs b/coordinator/src/main.rs index 013781f19..080735391 100644 --- a/coordinator/src/main.rs +++ b/coordinator/src/main.rs @@ -536,7 +536,9 @@ async fn handle_processor_messages( loop { match new_tributary.try_recv() { Ok(tributary) => { - tributaries.insert(tributary.spec.set().session, tributary); + let set = tributary.spec.set(); + assert_eq!(set.network, network); + tributaries.insert(set.session, tributary); } Err(mpsc::error::TryRecvError::Empty) => {} Err(mpsc::error::TryRecvError::Disconnected) => { @@ -577,7 +579,7 @@ async fn handle_processor_messages( } }, ProcessorMessage::Coordinator(inner_msg) => match inner_msg { - // This is a special case as it's relevant to *all* Tributaries + // This is a special case as it's relevant to *all* Tributaries for this network // It doesn't return a Tributary to become `relevant_tributary` though coordinator::ProcessorMessage::SubstrateBlockAck { network, block, plans } => { assert_eq!(