File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -555,11 +555,18 @@ where
555555 . observe ( block. trigger_count ( ) as f64 ) ;
556556 }
557557
558- // Check if we should skip this block (optimization for blocks without triggers)
558+ // Check if we should skip this block (optimization for blocks without triggers).
559+ // Do not skip if max_end_block has been reached — fall through to process_block so the
560+ // block pointer is persisted and the existing max_end_block check in handle_action fires.
561+ let max_end_block_reached = self
562+ . inputs
563+ . max_end_block
564+ . is_some_and ( |max| block_ptr. number >= max) ;
559565 if block. trigger_count ( ) == 0
560566 && self . state . skip_ptr_updates_timer . elapsed ( ) <= SKIP_PTR_UPDATES_THRESHOLD
561567 && !self . inputs . store . is_deployment_synced ( )
562568 && !close_to_chain_head ( & block_ptr, & self . inputs . chain . chain_head_ptr ( ) . await ?, 1000 )
569+ && !max_end_block_reached
563570 {
564571 // Skip this block and continue with the same stream
565572 return Ok ( RunnerState :: AwaitingBlock { block_stream } ) ;
You can’t perform that action at this time.
0 commit comments