Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Sep 9, 2024
1 parent 21fd57c commit 735c8aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/protocol/contracts/L2/IBlockHash.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.27;
/// @notice Interface for retrieving block hashes.
interface IBlockHash {
/// @notice Retrieves the block hash for a given block ID.
/// @param blockId The ID of the block whose hash is being requested.
/// @param _blockId The ID of the block whose hash is being requested.
/// @return The block hash of the specified block ID, or 0 if no hash is found.
function getBlockHash(uint256 blockId) external view returns (bytes32);
function getBlockHash(uint256 _blockId) external view returns (bytes32);
}
5 changes: 1 addition & 4 deletions packages/protocol/contracts/L2/TaikoL2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ contract TaikoL2 is EssentialContract, IBlockHash {
);
}

/// @notice Retrieves the block hash for the given L2 block number.
/// @param _blockId The L2 block number to retrieve the block hash for.
/// @return The block hash for the specified L2 block id, or zero if the
/// block id is greater than or equal to the current block number.
/// @inheritdoc IBlockHash
function getBlockHash(uint256 _blockId) public view returns (bytes32) {
if (_blockId >= block.number) return 0;
if (_blockId + 256 >= block.number) return blockhash(_blockId);
Expand Down

0 comments on commit 735c8aa

Please sign in to comment.