From 7e648d6536673a69f0c0def7fd37931bc68983d3 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Thu, 25 Jan 2024 20:24:45 +0800 Subject: [PATCH] Update TaikoL2.sol --- packages/protocol/contracts/L2/TaikoL2.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol index f740a39a160..c024fd435c6 100644 --- a/packages/protocol/contracts/L2/TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -199,7 +199,7 @@ contract TaikoL2 is CrossChainOwned, TaikoL2Signer, ICrossChainSync { /// block id is greater than or equal to the current block number. function getBlockHash(uint64 blockId) public view returns (bytes32) { if (blockId >= block.number) return 0; - if (blockId >= block.number - 256) return blockhash(blockId); + if (blockId + 256 >= block.number) return blockhash(blockId); return l2Hashes[blockId]; }