Update eth/catalyst/simulated_beacon.go

This commit is contained in:
jwasinger 2025-03-18 16:07:22 +01:00 committed by GitHub
parent 79b08977a7
commit 2d1e7d47b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,7 @@ func NewSimulatedBeacon(period uint64, feeRecipient common.Address, eth *eth.Eth
}
// cap the dev mode period to a reasonable maximum value to avoid overflowing the time.Duration (int64) that it will occupy
maxPeriod := uint64(math.Floor(math.MaxInt64 / 1_000_000_000))
maxPeriod := uint64(math.Floor(math.MaxInt64 / time.Second))
if period > maxPeriod {
log.Warn(fmt.Sprintf("period exceeds maximum possible value (have: %d, max: %d). Sanitizing period to maximum possible value.", period, maxPeriod))
period = maxPeriod