From 28857080d732857030eda80c69b9ba2c8926f221 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 31 Aug 2023 20:37:16 +0200 Subject: [PATCH] eth/catalyst: set random value in dev mode (#27940) * eth/catalyst: set random * Apply suggestions from code review --------- Co-authored-by: Martin Holst Swende --- eth/catalyst/simulated_beacon.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index daae2a7c0..1f7a3266c 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -17,6 +17,7 @@ package catalyst import ( + "crypto/rand" "errors" "sync" "time" @@ -149,10 +150,13 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error { c.setCurrentState(header.Hash(), *finalizedHash) } + var random [32]byte + rand.Read(random[:]) fcResponse, err := c.engineAPI.ForkchoiceUpdatedV2(c.curForkchoiceState, &engine.PayloadAttributes{ Timestamp: tstamp, SuggestedFeeRecipient: feeRecipient, Withdrawals: withdrawals, + Random: random, }) if err != nil { return err