File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
prover/bin/shadow-prove/src Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ async fn main() {
7676 l1_signer,
7777 ) ;
7878
79+ // Track the latest processed batch index
80+ let mut latest_processed_batch: u64 = 0 ;
81+
7982 loop {
8083 sleep ( Duration :: from_secs ( 30 ) ) . await ;
8184 // Get committed batch
@@ -88,9 +91,18 @@ async fn main() {
8891 }
8992 } ;
9093
94+ // Check if batch has already been processed
95+ if batch_info. batch_index <= latest_processed_batch {
96+ log:: info!( "Batch {} has already been processed, skipping" , batch_info. batch_index) ;
97+ continue ;
98+ }
99+
91100 // Execute batch
92101 match execute_batch ( & batch_info) . await {
93- Ok ( _) => ( ) ,
102+ Ok ( _) => {
103+ // Update the latest processed batch index
104+ latest_processed_batch = batch_info. batch_index ;
105+ } ,
94106 Err ( e) => {
95107 log:: error!( "execute_batch error: {:?}" , e) ;
96108 continue
You can’t perform that action at this time.
0 commit comments