Skip to content

Commit

Permalink
review nits (no-op)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjat committed Aug 16, 2023
1 parent 538f7fe commit bbbc487
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions analyzer/block/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (b *blockBasedAnalyzer) processedSubrangeInfo(ctx context.Context) (bool, i
return isContiguous, maxProcessedHeight, nil
}

// Returns true if the block immediately preceding `height` has been processed in slow-sync mode.
// Returns true if the block at `height` has been processed in slow-sync mode.
func (b *blockBasedAnalyzer) isBlockProcessedBySlowSync(ctx context.Context, height int64) (bool, error) {
var isProcessed bool
if err := b.target.QueryRow(
Expand Down Expand Up @@ -216,9 +216,9 @@ func (b *blockBasedAnalyzer) ensureSlowSyncPrerequisites(ctx context.Context) (o

// If the block before the one we'll attempt has been processed by fast-sync or not at all,
// we first refetch the full current state (i.e. genesis or similar).
precededBySlowSync, err2 := b.isBlockProcessedBySlowSync(ctx, maxProcessedHeight)
if err2 != nil {
b.logger.Error("Failed to obtain info about the last processed block", "err", err2, "last_processed_block", maxProcessedHeight)
precededBySlowSync, err := b.isBlockProcessedBySlowSync(ctx, maxProcessedHeight)
if err != nil {
b.logger.Error("Failed to obtain info about the last processed block", "err", err, "last_processed_block", maxProcessedHeight)
return false
}
if !precededBySlowSync {
Expand Down

0 comments on commit bbbc487

Please sign in to comment.