Skip to content

Commit

Permalink
adding error check when fetching the state update
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Voiculescu committed Jun 27, 2024
1 parent 7778988 commit 0aeeacd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpc/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func (f *Fetcher) Fetch(ctx context.Context, requestBlockNum uint64) (b *pbbstre
}

stateUpdate, err := f.FetchStateUpdate(ctx, requestBlockNum)
if err != nil {
return nil, false, fmt.Errorf("fetching state update: %w", err)
}

f.logger.Info("converting block", zap.Uint64("block_num", requestBlockNum))
bstreamBlock, err := convertBlock(blockWithReceipts, stateUpdate, lastL1AcceptedBlock)
Expand Down

0 comments on commit 0aeeacd

Please sign in to comment.