Skip to content

Commit

Permalink
fix: only use tempfile if necessary (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctian1 authored Mar 25, 2024
1 parent 5fa44d6 commit f668224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/stark/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ where
start.elapsed().as_secs_f64()
);
let commitment = data.main_commit.clone();
let file = tempfile::tempfile().unwrap();
let data = if reconstruct_commitments {
ShardMainDataWrapper::Empty()
} else if num_shards > save_disk_threshold {
let file = tempfile::tempfile().unwrap();
tracing::info_span!("saving trace to disk").in_scope(|| {
data.save(file).expect("failed to save shard main data")
})
Expand Down

0 comments on commit f668224

Please sign in to comment.