Skip to content

Commit

Permalink
fix: metrics last scanned block
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Feb 4, 2024
1 parent 7f9dd7a commit be69798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func StartMetrics(ctx context.Context, cfg *Config, l1Client *ethclient.Client,
TxSignerBalance.Set(float64(balance.Int64()))

var scannedBlock L2ScannedBlock
result := db.First(&scannedBlock)
result := db.Last(&scannedBlock)
if result.Error != nil && !errors.Is(result.Error, gorm.ErrRecordNotFound) {
logger.Error("failed to query scanned block", "error", result.Error)
}
Expand Down

0 comments on commit be69798

Please sign in to comment.