@@ -31,7 +31,7 @@ fn test_e2e_prove_verify() {
31
31
let chunks1 = load_batch ( "./tests/extra_traces/batch1" ) . unwrap ( ) ;
32
32
let chunks2 = load_batch ( "./tests/extra_traces/batch2" ) . unwrap ( ) ;
33
33
34
- let mut batch_prover = new_batch_prover ( & output_dir ) ;
34
+ let mut batch_prover_pending = None ;
35
35
let mut batch_header = None ;
36
36
let mut batch_proofs = Vec :: new ( ) ;
37
37
@@ -44,9 +44,11 @@ fn test_e2e_prove_verify() {
44
44
dump_as_json ( & output_dir, format ! ( "batch_prove_{}" , i+1 ) . as_str ( ) , & batch) . unwrap ( ) ;
45
45
if i == 0 {
46
46
dump_chunk_protocol ( & batch, & output_dir) ;
47
+ batch_prover_pending. replace ( new_batch_prover ( & output_dir) ) ;
47
48
}
49
+ let batch_prover = batch_prover_pending. as_mut ( ) . unwrap ( ) ;
48
50
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) ;
50
52
let proof_path = Path :: new ( & output_dir) . join ( "full_proof_batch_agg.json" ) ;
51
53
let proof_path_to = Path :: new ( & output_dir) . join ( format ! ( "full_proof_batch_agg_{}.json" , i+1 ) . as_str ( ) ) ;
52
54
fs:: rename ( proof_path, proof_path_to) . unwrap ( ) ;
@@ -56,10 +58,11 @@ fn test_e2e_prove_verify() {
56
58
batch_proofs. push ( batch_proof) ;
57
59
}
58
60
61
+ let batch_prover = batch_prover_pending. as_mut ( ) . unwrap ( ) ;
59
62
let bundle = prover:: BundleProvingTask {
60
63
batch_proofs,
61
64
} ;
62
- prove_and_verify_bundle ( & output_dir, & mut batch_prover, bundle) ;
65
+ prove_and_verify_bundle ( & output_dir, batch_prover, bundle) ;
63
66
}
64
67
65
68
fn gen_batch_proving_task (
0 commit comments