diff --git a/src/runtime2/component/component_random.rs b/src/runtime2/component/component_random.rs index b48f13b5b8e17d7f777e420aae1eeb5c34f8a324..b2f1fc7e1e569543728a739cddca12a4c6a0e766 100644 --- a/src/runtime2/component/component_random.rs +++ b/src/runtime2/component/component_random.rs @@ -2,14 +2,10 @@ use rand::prelude as random; use rand::RngCore; use crate::protocol::eval::{ValueGroup, Value}; -use crate::runtime2::*; +use crate::runtime2::communication::*; use super::*; -use super::component::{ - self, - Component, CompExecState, CompScheduling, - CompMode, ExitReason -}; +use super::component::*; use super::control_layer::*; use super::consensus::*; @@ -28,6 +24,8 @@ pub struct ComponentRandomU32 { did_perform_send: bool, // when in sync mode control: ControlLayer, consensus: Consensus, + inbox_main: InboxMain, // not used + inbox_backup: InboxBackup, // not used } impl Component for ComponentRandomU32 { @@ -51,7 +49,7 @@ impl Component for ComponentRandomU32 { Message::Control(message) => { if let Err(location_and_message) = component::default_handle_control_message( &mut self.exec_state, &mut self.control, &mut self.consensus, - message, sched_ctx, comp_ctx + message, sched_ctx, comp_ctx, &mut self.inbox_main, &mut self.inbox_backup ) { component::default_handle_error_for_builtin(&mut self.exec_state, sched_ctx, location_and_message); } @@ -64,7 +62,7 @@ impl Component for ComponentRandomU32 { sched_ctx.info(&format!("Running component ComponentRandomU32 (mode: {:?})", self.exec_state.mode)); match self.exec_state.mode { - CompMode::BlockedGet | CompMode::BlockedSelect => { + CompMode::BlockedGet | CompMode::BlockedSelect | CompMode::BlockedPutPorts => { // impossible for this component, no input ports and no select // blocks unreachable!(); @@ -104,7 +102,8 @@ impl Component for ComponentRandomU32 { let send_result = component::default_send_data_message( &mut self.exec_state, self.output_port_id, PortInstruction::NoSource, value_group, - sched_ctx, &mut self.consensus, comp_ctx + sched_ctx, &mut self.consensus, &mut self.control, + comp_ctx ); if let Err(location_and_message) = send_result { @@ -157,6 +156,8 @@ impl ComponentRandomU32 { did_perform_send: false, control: ControlLayer::default(), consensus: Consensus::new(), + inbox_main: Vec::new(), + inbox_backup: Vec::new(), } } } \ No newline at end of file