Skip to content

Commit 3cd7742

Browse files
committed
minor change
1 parent 538c7f0 commit 3cd7742

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/committer/poollatest.go

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

2222
for {
2323
latestBlock, err := libs.RpcClient.GetLatestBlockNumber(context.Background())
@@ -76,13 +76,13 @@ func pollLatest() error {
7676
nextBlockNumber = expectedBlockNumber
7777
metrics.CommitterNextBlockNumber.WithLabelValues(indexerName, chainIdStr).Set(float64(nextBlockNumber))
7878

79-
if !config.Cfg.CommitterIsLive && latestBlock.Int64()-int64(nextBlockNumber) < 20 && !isRightsizing {
80-
isRightsizing = true
79+
if !config.Cfg.CommitterIsLive && latestBlock.Int64()-int64(nextBlockNumber) < 20 && !hasRightsized {
8180
log.Debug().
8281
Uint64("latest_block", latestBlock.Uint64()).
8382
Uint64("next_commit_block", nextBlockNumber).
8483
Msg("Latest block is close to next commit block. Resizing s3 committer")
8584
libs.RightsizeS3Committer()
85+
hasRightsized = true
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)