From dd528d69835328daabb193a10afe5959935bcc59 Mon Sep 17 00:00:00 2001 From: "[gavin-ygy]" <[gavin.ygy@gmail.com]> Date: Mon, 23 Sep 2024 11:17:41 +0800 Subject: [PATCH] fix fmt --- host-program/src/bin/add-go-prove.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/host-program/src/bin/add-go-prove.rs b/host-program/src/bin/add-go-prove.rs index 4ed0f2c8..7c1a19d6 100644 --- a/host-program/src/bin/add-go-prove.rs +++ b/host-program/src/bin/add-go-prove.rs @@ -86,7 +86,7 @@ async fn main() -> Result<(), Box> { match proving_result { Ok(Some(prover_result)) => { if execute_only2 == false { - log::info!("Generating proof successfully .The proof file and verifier contract are in the path {}.",&output_dir); + log::info!("Generating proof successfully .The proof file and verifier contract are in the path {}.", &output_dir); let output_path = Path::new(&output_dir); let proof_result_path = output_path.join("snark_proof_with_public_inputs.json"); let _ = file::new(&proof_result_path.to_string_lossy()) @@ -98,18 +98,20 @@ async fn main() -> Result<(), Box> { .write(prover_result.solidity_verifier.as_slice()); } else { if prover_result.output_stream.len() == 0 { - log::info!("output_stream.len() is too short: {}",prover_result.output_stream.len()); + log::info!("output_stream.len() is too short: {}", prover_result.output_stream.len()); return Ok(()); } log::info!("Executing the guest program successfully."); - let ret_data: Data = bincode::deserialize_from(prover_result.output_stream.as_slice()) - .expect("deserialization failed"); + let ret_data: Data = + bincode::deserialize_from(prover_result.output_stream.as_slice()) + .expect("deserialization failed"); log::info!("ret_data: {:?}", ret_data); } } Ok(None) => { log::info!("Failed to generate proof.The result is None."); + return Ok(None); } Err(e) => { log::info!("Failed to generate proof. error: {}", e);