Skip to content

Commit 2885708

Browse files
eth/catalyst: set random value in dev mode (#27940)
* eth/catalyst: set random * Apply suggestions from code review --------- Co-authored-by: Martin Holst Swende <[email protected]>
1 parent 0acc0a1 commit 2885708

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eth/catalyst/simulated_beacon.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package catalyst
1818

1919
import (
20+
"crypto/rand"
2021
"errors"
2122
"sync"
2223
"time"
@@ -149,10 +150,13 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
149150
c.setCurrentState(header.Hash(), *finalizedHash)
150151
}
151152

153+
var random [32]byte
154+
rand.Read(random[:])
152155
fcResponse, err := c.engineAPI.ForkchoiceUpdatedV2(c.curForkchoiceState, &engine.PayloadAttributes{
153156
Timestamp: tstamp,
154157
SuggestedFeeRecipient: feeRecipient,
155158
Withdrawals: withdrawals,
159+
Random: random,
156160
})
157161
if err != nil {
158162
return err

0 commit comments

Comments
 (0)