Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew7234 committed Jan 4, 2024
1 parent 7266b20 commit 48e2d9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzer/consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,13 @@ func (m *processor) ProcessBlock(ctx context.Context, uheight uint64) error {
// Fetch all data.
fetchTimer := m.metrics.BlockFetchLatencies()
data, err := fetchAllData(ctx, m.source, m.network, height, m.mode == analyzer.FastSyncMode)
fetchTimer.ObserveDuration()
if err != nil {
if strings.Contains(err.Error(), fmt.Sprintf("%d must be less than or equal to the current blockchain height", height)) {
return analyzer.ErrOutOfRange
}
return err
}
fetchTimer.ObserveDuration() // We make no observation in case of a data fetch error; those timings are misleading.

// Process data, prepare updates.
analysisTimer := m.metrics.BlockAnalysisLatencies()
Expand Down

0 comments on commit 48e2d9d

Please sign in to comment.