File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ impl Batcher {
264264 & self ,
265265 block_number : u64 ,
266266 finalized_batch : BatchQueue ,
267+ wait_for_verification : bool ,
267268 ) -> Result < ( ) , BatcherError > {
268269 let batch_verification_data: Vec < VerificationData > = finalized_batch
269270 . clone ( )
@@ -298,6 +299,11 @@ impl Batcher {
298299 * last_uploaded_batch_block = block_number;
299300 }
300301
302+ if !wait_for_verification {
303+ send_batch_inclusion_data_responses ( finalized_batch, & batch_merkle_tree) . await ;
304+ return Ok ( ( ) ) ;
305+ }
306+
301307 // This future is created to be passed to the timeout function, so that if it is not resolved
302308 // within the timeout interval an error is raised. If the event is received, responses are sent to
303309 // connected clients
@@ -316,7 +322,7 @@ impl Batcher {
316322 /// finalizes the batch.
317323 async fn handle_new_block ( & self , block_number : u64 ) -> Result < ( ) , BatcherError > {
318324 while let Some ( finalized_batch) = self . is_batch_ready ( block_number) . await {
319- self . finalize_batch ( block_number, finalized_batch) . await ?;
325+ self . finalize_batch ( block_number, finalized_batch, false ) . await ?;
320326 }
321327 Ok ( ( ) )
322328 }
You can’t perform that action at this time.
0 commit comments