File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 ).
You can’t perform that action at this time.
0 commit comments