diff --git a/kimchi/src/precomputed_srs.rs b/kimchi/src/precomputed_srs.rs index 7dd2347c0d..474f8b6544 100644 --- a/kimchi/src/precomputed_srs.rs +++ b/kimchi/src/precomputed_srs.rs @@ -185,6 +185,7 @@ mod tests { if std::env::var("SRS_OVERWRITE").is_ok() { let mut file = std::fs::OpenOptions::new() .create(true) + .truncate(true) .write(true) .open(srs_path) .expect("failed to open SRS file"); diff --git a/msm/src/precomputed_srs.rs b/msm/src/precomputed_srs.rs index f278914419..1491b9beee 100644 --- a/msm/src/precomputed_srs.rs +++ b/msm/src/precomputed_srs.rs @@ -89,6 +89,7 @@ fn create_and_store_srs_with_path( // Open/create the file let mut file = std::fs::OpenOptions::new() .create(true) + .truncate(true) .write(true) .open(srs_path.clone()) .expect("failed to open SRS file");