Skip to content

Commit

Permalink
fix(protocol): fix proposeBlock()'s block id check (#18227)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Oct 11, 2024
1 parent 543385a commit 3a9d6c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/protocol/contracts/layer1/based/TaikoL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents {
returns (TaikoData.BlockMetadata memory meta_, TaikoData.EthDeposit[] memory deposits_)
{
TaikoData.Config memory config = getConfig();
(meta_,) = LibProposing.proposeBlock(state, config, this, _params, _txList);
if (meta_.id >= config.ontakeForkHeight) revert L1_FORK_ERROR();

TaikoData.BlockMetadataV2 memory metaV2;
(meta_, metaV2) = LibProposing.proposeBlock(state, config, this, _params, _txList);
if (metaV2.id >= config.ontakeForkHeight) revert L1_FORK_ERROR();
deposits_ = new TaikoData.EthDeposit[](0);
}

Expand Down

0 comments on commit 3a9d6c1

Please sign in to comment.