Update eth/catalyst/simulated_beacon.go

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
jwasinger 2025-03-17 14:38:57 +01:00 committed by GitHub
parent 87d35f0045
commit 788b01ac75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,7 +126,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 // cap the dev mode period to a reasonable maximum value to avoid overflowing the time.Duration (int64) that it will occupy
var maxPeriod uint64 = 9223372036 // math.Floor(math.MaxInt64 / 1000000000) var maxPeriod uint64 = math.Floor(math.MaxInt64 / 1_000_000_000)
if period > maxPeriod { if period > maxPeriod {
log.Warn(fmt.Sprintf("period exceeds maximum possible value (have: %d, max: %d). Sanitizing period to maximum possible value.", 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 period = maxPeriod