- /* Get enabled actors and insert them in the interleave set of the next graph_state */
- auto actors = mcapi::get().get_actors();
- for (auto& actor : actors)
- if (mcapi::get().actor_is_enabled(actor.copy.get_buffer()->get_pid()))
- next_pair->graph_state->add_interleaving_set(actor.copy.get_buffer());
- next_pair->requests = next_pair->graph_state->interleave_size();
+ /* Add all enabled actors to the interleave set of the initial state */
+ for (auto& act : api::get().get_actors()) {
+ auto actor = act.copy.get_buffer();
+ if (get_session().actor_is_enabled(actor->get_pid()))
+ next_pair->graph_state->mark_todo(actor);
+ }
+
+ next_pair->requests = next_pair->graph_state->count_todo();