Skip to content

Commit

Permalink
Insert RegisterApplications before the first user outcome. (#2377)
Browse files Browse the repository at this point in the history
  • Loading branch information
afck authored Aug 15, 2024
1 parent 3cee7a0 commit 6650002
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion linera-execution/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,13 @@ where
..RawExecutionOutcome::default()
};

// Insert the message before the first user outcome.
let index = results
.iter()
.position(|outcome| matches!(outcome, ExecutionOutcome::User(_, _)))
.unwrap_or(results.len());
// TODO(#2362): This inserts messages in front of existing ones, invalidating their IDs.
results.insert(0, ExecutionOutcome::System(system_outcome));
results.insert(index, ExecutionOutcome::System(system_outcome));

Ok(())
}
Expand Down

0 comments on commit 6650002

Please sign in to comment.