diff --git a/src/runtime2/component/consensus.rs b/src/runtime2/component/consensus.rs index 6fce74730a9d6cd923207f7239b804b1580cc005..dc11dd2c27b065ab112be629ac1ce3d31144a575 100644 --- a/src/runtime2/component/consensus.rs +++ b/src/runtime2/component/consensus.rs @@ -355,6 +355,20 @@ impl Consensus { self.solution.clear(); } + pub(crate) fn notify_received_port(&mut self, _expected_index: usize, port_handle: LocalPortHandle, comp_ctx: &CompCtx) { + debug_assert_eq!(_expected_index, self.ports.len()); + let port_info = comp_ctx.get_port(port_handle); + self.ports.push(PortAnnotation{ + self_comp_id: comp_ctx.id, + self_port_id: port_info.self_id, + peer_comp_id: port_info.peer_comp_id, + peer_port_id: port_info.peer_port_id, + peer_discovered: false, + mapping: None, + kind: port_info.kind, + }); + } + // ------------------------------------------------------------------------- // Handling inbound and outbound messages // -------------------------------------------------------------------------