@@ -587,8 +587,10 @@ contract Governance is MultiDelegateCall, UserProxyFactory, ReentrancyGuard, Own
587
587
int256 [] calldata _absoluteLQTYVotes ,
588
588
int256 [] calldata _absoluteLQTYVetos
589
589
) external nonReentrant {
590
- require (_initiatives.length == _absoluteLQTYVotes.length , "Length " );
591
- require (_absoluteLQTYVetos.length == _absoluteLQTYVotes.length , "Length " );
590
+ require (
591
+ _initiatives.length == _absoluteLQTYVotes.length && _absoluteLQTYVotes.length == _absoluteLQTYVetos.length ,
592
+ "Governance: array-length-mismatch "
593
+ );
592
594
593
595
// To ensure the change is safe, enforce uniqueness
594
596
_requireNoDuplicates (_initiativesToReset);
@@ -669,20 +671,16 @@ contract Governance is MultiDelegateCall, UserProxyFactory, ReentrancyGuard, Own
669
671
}
670
672
671
673
/// @dev For each given initiative applies relative changes to the allocation
672
- /// NOTE: Given the current usage the function either: Resets the value to 0, or sets the value to a new value
673
- /// Review the flows as the function could be used in many ways, but it ends up being used in just those 2 ways
674
+ /// @dev Assumes that all the input arrays are of equal length
675
+ /// @dev NOTE: Given the current usage the function either: Resets the value to 0, or sets the value to a new value
676
+ /// Review the flows as the function could be used in many ways, but it ends up being used in just those 2 ways
674
677
function _allocateLQTY (
675
678
address [] memory _initiatives ,
676
679
int256 [] memory _deltaLQTYVotes ,
677
680
int256 [] memory _deltaLQTYVetos ,
678
681
int256 [] memory _deltaOffsetVotes ,
679
682
int256 [] memory _deltaOffsetVetos
680
683
) internal {
681
- require (
682
- _initiatives.length == _deltaLQTYVotes.length && _initiatives.length == _deltaLQTYVetos.length ,
683
- "Governance: array-length-mismatch "
684
- );
685
-
686
684
AllocateLQTYMemory memory vars;
687
685
(vars.votesSnapshot_, vars.state) = _snapshotVotes ();
688
686
vars.currentEpoch = epoch ();
0 commit comments