Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit f439bd2

Browse files
committed
delay creation of batch prover
1 parent 7055953 commit f439bd2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

integration/tests/e2e_tests.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn test_e2e_prove_verify() {
3131
let chunks1 = load_batch("./tests/extra_traces/batch1").unwrap();
3232
let chunks2 = load_batch("./tests/extra_traces/batch2").unwrap();
3333

34-
let mut batch_prover = new_batch_prover(&output_dir);
34+
let mut batch_prover_pending = None;
3535
let mut batch_header = None;
3636
let mut batch_proofs = Vec::new();
3737

@@ -44,9 +44,11 @@ fn test_e2e_prove_verify() {
4444
dump_as_json(&output_dir, format!("batch_prove_{}", i+1).as_str(), &batch).unwrap();
4545
if i == 0 {
4646
dump_chunk_protocol(&batch, &output_dir);
47+
batch_prover_pending.replace(new_batch_prover(&output_dir));
4748
}
49+
let batch_prover = batch_prover_pending.as_mut().unwrap();
4850

49-
let batch_proof = prove_and_verify_batch(&output_dir, &mut batch_prover, batch);
51+
let batch_proof = prove_and_verify_batch(&output_dir, batch_prover, batch);
5052
let proof_path = Path::new(&output_dir).join("full_proof_batch_agg.json");
5153
let proof_path_to = Path::new(&output_dir).join(format!("full_proof_batch_agg_{}.json", i+1).as_str());
5254
fs::rename(proof_path, proof_path_to).unwrap();
@@ -56,10 +58,11 @@ fn test_e2e_prove_verify() {
5658
batch_proofs.push(batch_proof);
5759
}
5860

61+
let batch_prover = batch_prover_pending.as_mut().unwrap();
5962
let bundle = prover::BundleProvingTask {
6063
batch_proofs,
6164
};
62-
prove_and_verify_bundle(&output_dir, &mut batch_prover, bundle);
65+
prove_and_verify_bundle(&output_dir, batch_prover, bundle);
6366
}
6467

6568
fn gen_batch_proving_task(

0 commit comments

Comments
 (0)