diff --git a/src/runtime2/connector2.rs b/src/runtime2/connector2.rs index 82eea098b06518f068ab584ac20f1988260ce872..37ecca56cc66c87b0c6ec74d7295cc0d4bb1a350 100644 --- a/src/runtime2/connector2.rs +++ b/src/runtime2/connector2.rs @@ -96,7 +96,7 @@ impl Connector for ConnectorPDL { } impl ConnectorPDL { - pub fn new(initial: ComponentState, owned_ports: Vec) -> Self { + pub fn new(initial: ComponentState) -> Self { Self{ tree: ExecTree::new(initial), consensus: Consensus::new(), @@ -129,7 +129,7 @@ impl ConnectorPDL { let receiving_branch = &mut self.tree[receiving_branch_id]; receiving_branch.insert_message(message.data_header.target_port, message.content.clone()); - self.consensus.notify_of_received_message(branch_id, &message.data_header); + self.consensus.notify_of_received_message(branch_id, &message.data_header, &message.content); // And prepare the branch for running self.tree.push_into_queue(QueueKind::Runnable, receiving_branch_id); @@ -303,8 +303,9 @@ impl ConnectorPDL { definition_id, monomorph_idx, arguments ), }; - let new_component = ConnectorPDL::new(new_state, comp_ctx.workspace_ports.clone()); - comp_ctx.push_component(new_component); + let new_component = ConnectorPDL::new(new_state); + comp_ctx.push_component(new_component, comp_ctx.workspace_ports.clone()); + comp_ctx.workspace_ports.clear(); return ConnectorScheduling::Later; },