Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Commit 42be199

Browse files
committed
Fix metrics parse number error
1 parent 8a8577e commit 42be199

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

handlers/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (p *ProbeHandler) metricsProbe() (int, error) {
6464
if len(data) < 2 {
6565
continue
6666
}
67-
blockNumber := Bytes2Int64(bytes.ReplaceAll(data[len(data)-1], []byte{49}, nil))
67+
blockNumber := Bytes2Int64(bytes.TrimSpace(data[len(data)-1]))
6868
if blockNumber <= 0 {
6969
continue
7070
}

0 commit comments

Comments
 (0)