Skip to content

Commit

Permalink
fix(executor): separated require with 2 conditions into 2 statements (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 authored Feb 2, 2024
1 parent 91b48f9 commit bd09d4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions l1-contracts/contracts/zksync/facets/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,8 @@ contract ExecutorFacet is Base, IExecutor {
uint256 versionedHashIndex = 0;

require(_pubdataCommitments.length > 0, "pl");
require(
_pubdataCommitments.length <= PUBDATA_COMMITMENT_SIZE * MAX_NUMBER_OF_BLOBS &&
_pubdataCommitments.length % PUBDATA_COMMITMENT_SIZE == 0,
"bs"
);
require(_pubdataCommitments.length <= PUBDATA_COMMITMENT_SIZE * MAX_NUMBER_OF_BLOBS, "bd");
require(_pubdataCommitments.length % PUBDATA_COMMITMENT_SIZE == 0, "bs");
blobCommitments = new bytes32[](MAX_NUMBER_OF_BLOBS);

for (uint256 i = 0; i < _pubdataCommitments.length; i += PUBDATA_COMMITMENT_SIZE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ contract CommittingTest is ExecutorTest {

vm.prank(validator);

vm.expectRevert(bytes("bs"));
vm.expectRevert(bytes("bd"));
executor.commitBatches(genesisStoredBatchInfo, correctCommitBatchInfoArray);
}

Expand Down

0 comments on commit bd09d4f

Please sign in to comment.