fix CVF-7
This commit is contained in:
parent
53e7a69556
commit
790f049719
@ -235,10 +235,7 @@ contract TornadoTrees is Initializable {
|
||||
string memory _type,
|
||||
uint256 _from, // most likely array length after the proposal has passed
|
||||
uint256 _step // optimal step size to find first match, approximately equals dispersion
|
||||
) internal view returns (uint256) {
|
||||
if (_from == 0 && _step == 0) {
|
||||
return 0; // for tests
|
||||
}
|
||||
) internal view virtual returns (uint256) {
|
||||
// Find the segment with correct array length
|
||||
bool direction = elementExists(_tornadoTreesV1, _type, _from);
|
||||
do {
|
||||
|
@ -113,4 +113,16 @@ contract TornadoTreesMock is TornadoTrees {
|
||||
_withdrawals[i] = withdrawals[lastProcessedWithdrawalLeaf + i];
|
||||
}
|
||||
}
|
||||
|
||||
function findArrayLength(
|
||||
ITornadoTreesV1 _tornadoTreesV1,
|
||||
string memory _type,
|
||||
uint256 _from, // most likely array length after the proposal has passed
|
||||
uint256 _step // optimal step size to find first match, approximately equals dispersion
|
||||
) internal view override returns (uint256) {
|
||||
if (_from == 0 && _step == 0) {
|
||||
return 0;
|
||||
}
|
||||
return super.findArrayLength(_tornadoTreesV1, _type, _from, _step);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user