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!(