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]; }