Handle events set by actions
Before the events would not be handled until the next
iteration of the consensus runner
@@ -100,13 +100,18 @@ where
let unprocessed_event = self
.unprocessed_event_source
.get_next_event(service_id, epoch)?;
+
let event = match unprocessed_event {
Some(event) => event,
None => {
- // execute any commands returned from actions
+ if !commands.is_empty() {
self.store_command_executor.execute(commands)?;
+ continue;
+ } else {
+ // No actions and no events
break Ok(());
}
+ }
};
let (event_id, event) = event.deconstruct();
