From a6b8f42ca5952a3d0b4882c957ae97b7c833f5c9 Mon Sep 17 00:00:00 2001 From: ilya Date: Fri, 17 Jan 2025 19:12:35 +0000 Subject: [PATCH] [TRIVIAL] Add implementation detail reminder for the settlement queue (#3240) ~~Seems like it was overlooked in https://github.com/cowprotocol/services/pull/3129. `/solve` requests must not be sent in case the settlement queue for the current solver is out of capacity.~~ Adds a comment as a reminder that the queue needs to be checked only **after** the solve response is received. --- crates/driver/src/infra/api/routes/solve/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/driver/src/infra/api/routes/solve/mod.rs b/crates/driver/src/infra/api/routes/solve/mod.rs index 98faccaa7c..224e99fc5f 100644 --- a/crates/driver/src/infra/api/routes/solve/mod.rs +++ b/crates/driver/src/infra/api/routes/solve/mod.rs @@ -37,6 +37,8 @@ async fn route( .prioritize(auction, &competition.solver.account().address()) .await; let result = competition.solve(auction).await; + // Solving takes some time, so there is a chance for the settlement queue to + // have capacity again. competition.ensure_settle_queue_capacity()?; observe::solved(state.solver().name(), &result); Ok(axum::Json(dto::SolveResponse::new(