Skip to content

Commit

Permalink
prover_main does not need to be async
Browse files Browse the repository at this point in the history
  • Loading branch information
hrxi committed Nov 20, 2024
1 parent 05c1550 commit d2631c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async fn main_inner() -> Result<(), Error> {
// Early return in case of a proving process.
if command_line.prove {
info!("Starting proof generation. Waiting for input.");
return Ok(prover_main().await?);
return Ok(prover_main()?);
}

// Create config builder and apply command line and config file.
Expand Down
5 changes: 2 additions & 3 deletions zkp-component/src/bin/nimiq-test-prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ use nimiq_zkp_component::prover_binary::prover_main;
use tracing_subscriber::{filter::Targets, prelude::*};

/// This binary is only used in tests.
#[tokio::main]
async fn main() {
fn main() {
initialize();
log::info!("Starting proof generation");
prover_main().await.unwrap();
prover_main().unwrap();
}

fn initialize() {
Expand Down
2 changes: 1 addition & 1 deletion zkp-component/src/prover_binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
types::{ProofInput, ZKProofGenerationError, PROOF_GENERATION_OUTPUT_DELIMITER},
};

pub async fn prover_main() -> Result<(), Error> {
pub fn prover_main() -> Result<(), Error> {
// Read proof input from stdin.
let mut stdin_buf = vec![];
let mut stdin = BufReader::new(io::stdin());
Expand Down

0 comments on commit d2631c7

Please sign in to comment.