Skip to content

Commit

Permalink
fix(halo/evmengine): fix optimistic block timestamp (#478)
Browse files Browse the repository at this point in the history
Fix optimistic block timestamp bug

task: none
  • Loading branch information
corverroos authored Mar 1, 2024
1 parent 01c36d0 commit f6e3f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion halo/evmengine/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s msgServer) ExecutionPayload(ctx context.Context, msg *types.MsgExecution
if s.buildOptimistic && isNext {
log.Debug(ctx, "Triggering optimistic EVM payload build", "next_height", nextHeight)
ts := uint64(time.Now().Unix())
if payload.Timestamp <= ts {
if ts <= payload.Timestamp {
ts = payload.Timestamp + 1 // Subsequent blocks must have a higher timestamp.
}
attrs = &engine.PayloadAttributes{
Expand Down

0 comments on commit f6e3f6a

Please sign in to comment.