diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index 3a45cd65d9..291f91874c 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -144,9 +144,9 @@ func (c *SimulatedBeacon) Stop() error { // sealBlock initiates payload building for a new block and creates a new block // with the completed payload. -func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, tstamp uint64) error { - if tstamp <= c.lastBlockTime { - tstamp = c.lastBlockTime + 1 +func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp uint64) error { + if timestamp <= c.lastBlockTime { + timestamp = c.lastBlockTime + 1 } c.feeRecipientLock.Lock() feeRecipient := c.feeRecipient @@ -161,7 +161,7 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, tstamp uint var random [32]byte rand.Read(random[:]) fcResponse, err := c.engineAPI.ForkchoiceUpdatedV2(c.curForkchoiceState, &engine.PayloadAttributes{ - Timestamp: tstamp, + Timestamp: timestamp, SuggestedFeeRecipient: feeRecipient, Withdrawals: withdrawals, Random: random, diff --git a/ethclient/simulated/backend.go b/ethclient/simulated/backend.go index 8cfb7992f3..68b69c0aad 100644 --- a/ethclient/simulated/backend.go +++ b/ethclient/simulated/backend.go @@ -178,7 +178,7 @@ func (n *Backend) Fork(parentHash common.Hash) error { return n.beacon.Fork(parentHash) } -// AdjustTime changes the block timestamp. +// AdjustTime changes the block timestamp and creates a new block. // It can only be called on empty blocks. func (n *Backend) AdjustTime(adjustment time.Duration) error { return n.beacon.AdjustTime(adjustment)