Unverified Commit 28857080 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

eth/catalyst: set random value in dev mode (#27940)

* eth/catalyst: set random

* Apply suggestions from code review

---------
Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
parent 0acc0a1f
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package catalyst package catalyst
import ( import (
"crypto/rand"
"errors" "errors"
"sync" "sync"
"time" "time"
...@@ -149,10 +150,13 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error { ...@@ -149,10 +150,13 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
c.setCurrentState(header.Hash(), *finalizedHash) c.setCurrentState(header.Hash(), *finalizedHash)
} }
var random [32]byte
rand.Read(random[:])
fcResponse, err := c.engineAPI.ForkchoiceUpdatedV2(c.curForkchoiceState, &engine.PayloadAttributes{ fcResponse, err := c.engineAPI.ForkchoiceUpdatedV2(c.curForkchoiceState, &engine.PayloadAttributes{
Timestamp: tstamp, Timestamp: tstamp,
SuggestedFeeRecipient: feeRecipient, SuggestedFeeRecipient: feeRecipient,
Withdrawals: withdrawals, Withdrawals: withdrawals,
Random: random,
}) })
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment