Skip to content

Commit

Permalink
confirm to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles committed Sep 14, 2023
1 parent 95865db commit dc0c299
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mev-rs/src/blinded_block_relayer/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl BlindedBlockRelayer for Client {
let path = format!("/relay/v1/builder/blocks");
let target = self.api.endpoint.join(&path).map_err(ApiError::from)?;
let mut request = self.api.http.post(target).json(signed_submission);
if with_cancellations { request = request.query(&[("cancellations", with_cancellations)]) };
if with_cancellations { request = request.query(&[("cancellations", "1")]) };
let response = request.send().await.map_err(ApiError::from)?;
api_error_or_ok(response).await.map_err(From::from)
}
Expand Down
3 changes: 2 additions & 1 deletion mev-rs/src/blinded_block_relayer/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ async fn handle_get_proposal_schedule<R: BlindedBlockRelayer>(

async fn handle_submit_bid<R: BlindedBlockRelayer>(
State(relayer): State<R>,
Query(with_cancellations): Query<bool>,
Query(with_cancellations): Query<String>,
Json(signed_bid_submission): Json<SignedBidSubmission>,
) -> Result<(), Error> {
tracing::info!("handling bid submission");
let with_cancellations = if with_cancellations == "1" { true } else { false };
relayer.submit_bid(&signed_bid_submission, with_cancellations).await
}

Expand Down

0 comments on commit dc0c299

Please sign in to comment.