Skip to content

Commit

Permalink
eth/catalyst: set random value in dev mode (#27940)
Browse files Browse the repository at this point in the history
* eth/catalyst: set random

* Apply suggestions from code review

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
  • Loading branch information
MariusVanDerWijden and holiman authored Aug 31, 2023
1 parent 0acc0a1 commit 2885708
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eth/catalyst/simulated_beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package catalyst

import (
"crypto/rand"
"errors"
"sync"
"time"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2885708

Please sign in to comment.