Skip to content

Commit 95a2c22

Browse files
eth/catalyst: prevent division by zero (#25654)
eth/catalyst: prevent diff by zero
1 parent 3f79afb commit 95a2c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/catalyst/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ func (api *ConsensusAPI) heartbeat() {
656656
if deltaTime > 0 {
657657
growth := deltaDiff / deltaTime
658658
left := new(big.Int).Sub(ttd, htd)
659-
eta = time.Duration(new(big.Int).Div(left, new(big.Int).SetUint64(growth)).Uint64()) * time.Second
659+
eta = time.Duration(new(big.Int).Div(left, new(big.Int).SetUint64(growth+1)).Uint64()) * time.Second
660660
}
661661
}
662662
message := "Merge is configured, but previously seen beacon client is offline. Please ensure it is operational before the transition arrives!"

0 commit comments

Comments
 (0)