Skip to content

Commit ed8ef1c

Browse files
committed
Fix segfault on failed latest block fetch
1 parent 12f9a19 commit ed8ef1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sync/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ func (s *Synchronizer) pollLatest(ctx context.Context, sem chan struct{}) {
376376
s.log.Warnw("Failed fetching latest block", "err", err)
377377
} else {
378378
s.highestBlockHeader.Store(highestBlock.Header)
379+
s.bestBlockGauge.Set(float64(highestBlock.Header.Number))
379380
}
380-
s.bestBlockGauge.Set(float64(highestBlock.Header.Number))
381381
}()
382382
default:
383383
}

0 commit comments

Comments
 (0)