From 0b4adbc4a6dacec6018bf1917f3b6484bdf5d0e2 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 29 Feb 2024 12:32:10 +0100 Subject: [PATCH] fix random attr --- eth/catalyst/simulated_beacon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index 021ce23795..7bf547f6c1 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -161,8 +161,9 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp u c.setCurrentState(header.Hash(), *finalizedHash) } + var random [32]byte + rand.Read(random[:]) var ( - random [32]byte payloadVersion = engine.PayloadV2 attrs = &engine.PayloadAttributes{ Timestamp: timestamp, @@ -171,7 +172,6 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp u Random: random, } ) - rand.Read(random[:]) if isCancun { payloadVersion = engine.PayloadV3 attrs.BeaconRoot = &common.Hash{}