Skip to content

Commit

Permalink
refactor(protocol): simplify some protocol code based on OpenZeppelin…
Browse files Browse the repository at this point in the history
…'s recommendation (#18308)
  • Loading branch information
dantaik committed Oct 27, 2024
1 parent 0c88472 commit 6196eaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/protocol/contracts/layer1/based/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ library LibProposing {
}

if (local.params.anchorBlockId == 0) {
unchecked {
local.params.anchorBlockId = uint64(block.number - 1);
}
}

if (local.params.timestamp == 0) {
Expand Down Expand Up @@ -184,6 +186,7 @@ library LibProposing {
|| local.params.timestamp < parentBlk.proposedAt
) {
revert L1_INVALID_TIMESTAMP();

}

// Check if parent block has the right meta hash. This is to allow the proposer to make
Expand Down

0 comments on commit 6196eaa

Please sign in to comment.