Skip to content

Commit

Permalink
simplify length checks
Browse files Browse the repository at this point in the history
  • Loading branch information
0xvv committed Jan 17, 2025
1 parent 9fc63c3 commit a268ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contracts/StakingContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,11 @@ contract StakingContract {
revert InvalidArgument();
}

if (_publicKeys.length % PUBLIC_KEY_LENGTH != 0 || _publicKeys.length / PUBLIC_KEY_LENGTH != _keyCount) {
if (_publicKeys.length != PUBLIC_KEY_LENGTH * _keyCount) {
revert InvalidPublicKeys();
}

if (_signatures.length % SIGNATURE_LENGTH != 0 || _signatures.length / SIGNATURE_LENGTH != _keyCount) {
if (_signatures.length != SIGNATURE_LENGTH * _keyCount) {
revert InvalidSignatures();
}

Expand Down

0 comments on commit a268ce5

Please sign in to comment.