Skip to content

Commit

Permalink
test: fix bug in bound usage during fork tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smol-ninja committed Feb 2, 2024
1 parent a0712ca commit 8f4c3de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/fork/merkle-streamer/MerkleStreamerLL.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ abstract contract MerkleStreamerLL_Fork_Test is Fork_Test {
vars.indexes[i] = params.leafData[i].index;

// Bound each leaf amount so that `aggregateAmount` does not overflow.
vars.amounts[i] = uint128(_bound(params.leafData[i].amount, 1, MAX_UINT256 / vars.recipientsCount - 1));
params.leafData[i].amount =
uint128(_bound(params.leafData[i].amount, 1, MAX_UINT256 / vars.recipientsCount - 1));
vars.amounts[i] = params.leafData[i].amount;
vars.aggregateAmount += params.leafData[i].amount;

// Avoid zero recipient addresses.
Expand Down

0 comments on commit 8f4c3de

Please sign in to comment.