Skip to content

Commit 538c7f0

Browse files
committed
minor change
1 parent 061cc55 commit 538c7f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/committer/poollatest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func pollLatest() error {
1717
// Initialize metrics labels
1818
chainIdStr := libs.ChainIdStr
1919
indexerName := config.Cfg.ZeetProjectName
20+
isRightsizing := false
2021

2122
for {
2223
latestBlock, err := libs.RpcClient.GetLatestBlockNumber(context.Background())
@@ -75,7 +76,8 @@ func pollLatest() error {
7576
nextBlockNumber = expectedBlockNumber
7677
metrics.CommitterNextBlockNumber.WithLabelValues(indexerName, chainIdStr).Set(float64(nextBlockNumber))
7778

78-
if !config.Cfg.CommitterIsLive && latestBlock.Int64()-int64(nextBlockNumber) < 20 {
79+
if !config.Cfg.CommitterIsLive && latestBlock.Int64()-int64(nextBlockNumber) < 20 && !isRightsizing {
80+
isRightsizing = true
7981
log.Debug().
8082
Uint64("latest_block", latestBlock.Uint64()).
8183
Uint64("next_commit_block", nextBlockNumber).

0 commit comments

Comments
 (0)