Skip to content

Commit

Permalink
Merge branch 'main' into fee-and-x-route
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Rodrigues Lordello authored May 31, 2022
2 parents 156ea99 + 77d267f commit 829c2de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/shared/src/http_solver/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ impl SettledBatchAuctionModel {
pub fn has_execution_plan(&self) -> bool {
// Its a bit weird that we expect all entries to contain an execution plan. Could make
// execution plan required and assert that the vector of execution updates is non-empty
// - NOTE(nlordell): This was done as a way for the HTTP solvers to say "look, we found
// a solution but don't know how to order the AMMs to execute it". I think that we
// can, as the parent comment suggests, clean this up and just make the field required.

let amm_executions = self
.amms
.values()
.flat_map(|u| u.execution.iter().map(|e| &e.exec_plan));
let interaction_executions = self.interaction_data.iter().map(|i| &i.exec_plan);
// **Intentionally** allow interactions without execution plans.

amm_executions
.chain(interaction_executions)
self.amms
.values()
.flat_map(|u| u.execution.iter().map(|e| &e.exec_plan))
.all(|ex| ex.is_some())
}
}
Expand Down

0 comments on commit 829c2de

Please sign in to comment.