From 9d18d598fe3e890a1f35e2d39916d554282ee4a0 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:14:00 +0800 Subject: [PATCH] fix(protocol): revert a change to maintain taiko-geth compatibility (#18331) Co-authored-by: David --- .../protocol/contracts/layer1/based/LibProposing.sol | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/protocol/contracts/layer1/based/LibProposing.sol b/packages/protocol/contracts/layer1/based/LibProposing.sol index 8ea6711dbd3..9799ee9e0ea 100644 --- a/packages/protocol/contracts/layer1/based/LibProposing.sol +++ b/packages/protocol/contracts/layer1/based/LibProposing.sol @@ -180,14 +180,12 @@ library LibProposing { local.params.coinbase = local.params.proposer; } - unchecked { - if (local.params.anchorBlockId == 0) { - local.params.anchorBlockId = uint64(block.number - 1); - } + if (!local.postFork || local.params.anchorBlockId == 0) { + local.params.anchorBlockId = uint64(block.number - 1); + } - if (local.params.timestamp == 0) { - local.params.timestamp = uint64(block.timestamp); - } + if (!local.postFork || local.params.timestamp == 0) { + local.params.timestamp = uint64(block.timestamp); } // Verify params against the parent block.