Another fix

This commit is contained in:
mcamou 2024-06-04 16:25:18 +02:00
parent 9de09fa830
commit 7fc66653fa
1 changed files with 4 additions and 3 deletions

View File

@ -78,8 +78,9 @@ func (c *solanaCollector) WatchSlots() {
// watermark is the last slot number we generated ticks for. Set it to the current offset on startup (we do not backfill slots we missed at startup) // watermark is the last slot number we generated ticks for. Set it to the current offset on startup (we do not backfill slots we missed at startup)
watermark := info.AbsoluteSlot watermark := info.AbsoluteSlot
firstSlot, lastSlot, currentEpoch := getEpochBounds(info) currentEpoch, firstSlot, lastSlot := getEpochBounds(info)
klog.Infof("Starting at slot %d in epoch %d (%d-%d)", firstSlot, currentEpoch, firstSlot, lastSlot)
ticker := time.NewTicker(slotPacerSchedule) ticker := time.NewTicker(slotPacerSchedule)
for { for {
@ -116,7 +117,7 @@ func (c *solanaCollector) WatchSlots() {
} }
klog.Infof( klog.Infof(
"counters updated to slot %d (+%d), epoch %d (from slot %d to %d, %d remaining)", "counters updated to slot %d (+%d), epoch %d (slots %d-%d, %d remaining)",
last, last,
last-watermark, last-watermark,
currentEpoch, currentEpoch,
@ -126,7 +127,7 @@ func (c *solanaCollector) WatchSlots() {
) )
watermark = last watermark = last
firstSlot, lastSlot, currentEpoch = getEpochBounds(info) currentEpoch, firstSlot, lastSlot = getEpochBounds(info)
currentEpochNumber.Set(float64(currentEpoch)) currentEpochNumber.Set(float64(currentEpoch))
epochFirstSlot.Set(float64(firstSlot)) epochFirstSlot.Set(float64(firstSlot))