Skip to content

Commit

Permalink
eth/catalyst: prevent diff by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Aug 31, 2022
1 parent 3f79afb commit 663fad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func (api *ConsensusAPI) heartbeat() {
if deltaTime > 0 {
growth := deltaDiff / deltaTime
left := new(big.Int).Sub(ttd, htd)
eta = time.Duration(new(big.Int).Div(left, new(big.Int).SetUint64(growth)).Uint64()) * time.Second
eta = time.Duration(new(big.Int).Div(left, new(big.Int).SetUint64(growth+1)).Uint64()) * time.Second
}
}
message := "Merge is configured, but previously seen beacon client is offline. Please ensure it is operational before the transition arrives!"
Expand Down

0 comments on commit 663fad2

Please sign in to comment.