From 862ae42b6e6701065459aa8d6730c77e53238b8b Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 19 Mar 2025 15:01:05 +0100 Subject: [PATCH] eth/catalyst: fix build and simplify maxPeriod calc --- core/era_backend.go | 1 + eth/catalyst/simulated_beacon.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 core/era_backend.go diff --git a/core/era_backend.go b/core/era_backend.go new file mode 100644 index 0000000000..9a8bc9592b --- /dev/null +++ b/core/era_backend.go @@ -0,0 +1 @@ +package core diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index c96bfb4e15..f1235f4ab5 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -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 / time.Second)) + maxPeriod := uint64(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