Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
[gavin-ygy] committed Sep 23, 2024
1 parent 45719da commit dd528d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions host-program/src/bin/add-go-prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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())
Expand All @@ -98,18 +98,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.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);
Expand Down

0 comments on commit dd528d6

Please sign in to comment.