Skip to content

Commit

Permalink
Node/EVM: Shouldn't publish safe block in hbs (#3466)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley authored Oct 26, 2023
1 parent a04e8a3 commit 03dc4c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/pkg/watchers/evm/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,17 +667,17 @@ func (w *Watcher) Run(parentCtx context.Context) error {
zap.Bool("is_safe_block", ev.Safe),
zap.String("eth_network", w.networkName))
readiness.SetReady(w.readinessSync)
p2p.DefaultRegistry.SetNetworkStats(w.chainID, &gossipv1.Heartbeat_Network{
Height: ev.Number.Int64(),
ContractAddress: w.contract.Hex(),
})

w.pendingMu.Lock()

blockNumberU := ev.Number.Uint64()
if ev.Safe {
atomic.StoreUint64(&currentSafeBlockNumber, blockNumberU)
} else {
p2p.DefaultRegistry.SetNetworkStats(w.chainID, &gossipv1.Heartbeat_Network{
Height: ev.Number.Int64(),
ContractAddress: w.contract.Hex(),
})
atomic.StoreUint64(&currentBlockNumber, blockNumberU)
atomic.StoreUint64(&w.latestFinalizedBlockNumber, blockNumberU)
currentEthHeight.WithLabelValues(w.networkName).Set(float64(ev.Number.Int64()))
Expand Down

0 comments on commit 03dc4c5

Please sign in to comment.