Skip to content

Commit

Permalink
fix: Ensure segment dir is in-scope during proving (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Inphi authored Mar 12, 2024
1 parent e7f6973 commit d131901
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions host/src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ pub fn prove_locally(
encoded_input.len(),
encoded_input.len() * 4 / 1_000_000
);
let segment_dir = tempdir().unwrap();

info!("Running the prover...");
let session = {
Expand All @@ -332,8 +333,6 @@ pub fn prove_locally(
let env = env_builder.build().unwrap();
let mut exec = ExecutorImpl::from_elf(env, elf).unwrap();

let segment_dir = tempdir().unwrap();

exec.run_with_callback(|segment| {
Ok(Box::new(FileSegmentRef::new(&segment, segment_dir.path())?))
})
Expand Down

0 comments on commit d131901

Please sign in to comment.