Skip to content

Commit

Permalink
Caplin: update highest process slot correctly during ForwardSync (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 authored Feb 15, 2025
1 parent 9444652 commit be6dc84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cl/phase1/stages/forward_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ func processDownloadedBlockBatches(ctx context.Context, logger log.Logger, cfg *
if errors.Is(err, forkchoice.ErrEIP4844DataNotAvailable) {
// Return an error if EIP-4844 data is not available
logger.Trace("[Caplin] forward sync EIP-4844 data not available", "blockSlot", block.Block.Slot)
return highestBlockProcessed, nil
if newHighestBlockProcessed == 0 {
return 0, nil
}
return newHighestBlockProcessed - 1, nil
}
// Return an error if block processing fails
err = fmt.Errorf("bad blocks segment received: %w", err)
Expand Down

0 comments on commit be6dc84

Please sign in to comment.