diff --git a/src/runtime2/component/consensus.rs b/src/runtime2/component/consensus.rs index d38f63cb61243b5d8836110d88536dfdabf6d9b8..b782ef0bf1d7ee20baaa589eb2b6aceaa3e1b2c6 100644 --- a/src/runtime2/component/consensus.rs +++ b/src/runtime2/component/consensus.rs @@ -79,7 +79,6 @@ impl SolutionCombiner { let channel_index = if entry.getter.is_some() && entry.putter.is_some() { let channel_index = self.solution.channel_mapping.len(); self.solution.channel_mapping.push(entry); - self.matched_channels += 1; channel_index } else if let Some(putter) = entry.putter { @@ -423,7 +422,7 @@ impl Consensus { } }, PortAnnotationKind::Getter(peer_port) => { - if peer_port.peer_comp_id != comp_ctx.id { + if peer_port.peer_comp_id == comp_ctx.id { // Peer indicates that we talked to it let self_port_handle = comp_ctx.get_port_handle(peer_port.peer_port_id); let self_port_index = comp_ctx.get_port_index(self_port_handle); diff --git a/src/runtime2/tests/mod.rs b/src/runtime2/tests/mod.rs index 08d0f0d2e0ec7f261091cf9ff020c3fc3bbad532..a316a1561c391dd2207cc46779f1acfeb2834c14 100644 --- a/src/runtime2/tests/mod.rs +++ b/src/runtime2/tests/mod.rs @@ -115,18 +115,21 @@ fn test_intermediate_messenger() { auto num = 0; channel tx_a -> rx_a; channel tx_b -> rx_b; - new sender(tx_a, 1); - new middleman(rx_a, tx_b, 2); + new sender(tx_a, 3); + new middleman(rx_a, tx_b, 3); new receiver(rx_b, 3); } composite constructor() { new constructor_template(); - // new constructor_template(); - // new constructor_template(); + new constructor_template(); + new constructor_template(); + new constructor_template(); + new constructor_template(); + new constructor_template(); } ").expect("compilation"); - let rt = Runtime::new(1, true, pd); + let rt = Runtime::new(3, true, pd); create_component(&rt, "", "constructor", no_args()); }