|
@@ -667,10 +667,6 @@ func (w *Watcher) Run(parentCtx context.Context) error {
|
|
|
zap.Bool("is_safe_block", ev.Safe),
|
|
zap.Bool("is_safe_block", ev.Safe),
|
|
|
zap.String("eth_network", w.networkName))
|
|
zap.String("eth_network", w.networkName))
|
|
|
readiness.SetReady(w.readinessSync)
|
|
readiness.SetReady(w.readinessSync)
|
|
|
- p2p.DefaultRegistry.SetNetworkStats(w.chainID, &gossipv1.Heartbeat_Network{
|
|
|
|
|
- Height: ev.Number.Int64(),
|
|
|
|
|
- ContractAddress: w.contract.Hex(),
|
|
|
|
|
- })
|
|
|
|
|
|
|
|
|
|
w.pendingMu.Lock()
|
|
w.pendingMu.Lock()
|
|
|
|
|
|
|
@@ -678,6 +674,10 @@ func (w *Watcher) Run(parentCtx context.Context) error {
|
|
|
if ev.Safe {
|
|
if ev.Safe {
|
|
|
atomic.StoreUint64(¤tSafeBlockNumber, blockNumberU)
|
|
atomic.StoreUint64(¤tSafeBlockNumber, blockNumberU)
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ p2p.DefaultRegistry.SetNetworkStats(w.chainID, &gossipv1.Heartbeat_Network{
|
|
|
|
|
+ Height: ev.Number.Int64(),
|
|
|
|
|
+ ContractAddress: w.contract.Hex(),
|
|
|
|
|
+ })
|
|
|
atomic.StoreUint64(¤tBlockNumber, blockNumberU)
|
|
atomic.StoreUint64(¤tBlockNumber, blockNumberU)
|
|
|
atomic.StoreUint64(&w.latestFinalizedBlockNumber, blockNumberU)
|
|
atomic.StoreUint64(&w.latestFinalizedBlockNumber, blockNumberU)
|
|
|
currentEthHeight.WithLabelValues(w.networkName).Set(float64(ev.Number.Int64()))
|
|
currentEthHeight.WithLabelValues(w.networkName).Set(float64(ev.Number.Int64()))
|