Skip to content

Commit

Permalink
fix: fix submit_proof_req
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmountaintop committed Oct 8, 2024
1 parent e18d630 commit 9f29871
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/coordinator_handler/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ impl Api {
let url = self.build_url(method)?;
let request_body = serde_json::to_string(req)?;

log::info!("[coordinator client], {method}, request: {request_body}");
log::info!("[coordinator client], {method}, sent request");
log::debug!("[coordinator client], {method}, request: {request_body}");
let response = self
.client
.post(url)
Expand All @@ -62,10 +63,10 @@ impl Api {
.await?;

if response.status() != http::status::StatusCode::OK {
log::error!(
"[coordinator client], {method}, status not ok: {}",
response.status()
);
// log::error!(
// "[coordinator client], {method}, status not ok: {}",
// response.status()
// );
anyhow::bail!(
"[coordinator client], {method}, status not ok: {}",
response.status()
Expand All @@ -74,7 +75,8 @@ impl Api {

let response_body = response.text().await?;

log::info!("[coordinator client], {method}, response: {response_body}");
log::info!("[coordinator client], {method}, received response");
log::debug!("[coordinator client], {method}, response: {response_body}");
serde_json::from_str(&response_body).map_err(|e| anyhow::anyhow!(e))
}

Expand Down
3 changes: 2 additions & 1 deletion src/prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ impl Prover {
let submit_proof_req = SubmitProofRequest {
uuid: coordinator_task_uuid.clone(),
task_id: coordinator_task_id.clone(),
task_type: task.circuit_type,
// task_type: task.circuit_type, // TODO: task.circuit_type is incorrect atm
task_type,
status: ProofStatus::Ok,
proof: task.proof.unwrap(),
failure_type: None,
Expand Down

0 comments on commit 9f29871

Please sign in to comment.