File tree Expand file tree Collapse file tree
bin/withdrawal-finalizer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ async fn main() -> Result<()> {
269269 we_tx_wrapped,
270270 ) ) ;
271271
272- let watcher_handle = tokio:: spawn ( watcher. run ( blocks_rx, we_rx, from_l2_block) ) ;
272+ let watcher_handle = tokio:: spawn ( watcher. run ( blocks_rx, we_rx, from_l2_block, sl_chain_id ) ) ;
273273
274274 let block_events_handle = tokio:: spawn ( event_mux. run_with_reconnects (
275275 config. diamond_proxy_addr ,
Original file line number Diff line number Diff line change 6060 block_events : BE ,
6161 withdrawal_events : WE ,
6262 from_l2_block : u64 ,
63+ sl_chain_id : u32 ,
6364 ) -> Result < ( ) >
6465 where
6566 BE : Stream < Item = BlockEvent > + Send + ' static ,
9091 pgpool. clone ( ) ,
9192 block_events,
9293 l2_provider,
94+ sl_chain_id,
9395 ) ) ;
9496 let l2_loop_handler = tokio:: spawn ( async move {
9597 run_l2_events_loop (
@@ -346,7 +348,12 @@ async fn process_withdrawals_in_block(
346348 Ok ( ( ) )
347349}
348350
349- async fn run_l1_events_loop < BE , M2 > ( pool : PgPool , be : BE , l2_middleware : M2 ) -> Result < ( ) >
351+ async fn run_l1_events_loop < BE , M2 > (
352+ pool : PgPool ,
353+ be : BE ,
354+ l2_middleware : M2 ,
355+ chain_id : u32 ,
356+ ) -> Result < ( ) >
350357where
351358 BE : Stream < Item = BlockEvent > ,
352359 M2 : ZksyncMiddleware ,
@@ -357,7 +364,6 @@ where
357364 let mut batch_begin = Instant :: now ( ) ;
358365 let batch_backoff = Duration :: from_secs ( 5 ) ;
359366 let batch_size = 1024 ;
360- let chain_id = l2_middleware. get_chain_id ( ) . await ?;
361367 while let Some ( event) = be. next ( ) . await {
362368 tracing:: debug!( "block event {event}" ) ;
363369 block_event_batch. push ( event) ;
You can’t perform that action at this time.
0 commit comments