Skip to content

Commit

Permalink
chore: remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
xorsal committed Nov 18, 2024
1 parent 25c3341 commit a2e83e7
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions test/unit/HorizonAccountingExtension.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1536,17 +1536,11 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni
uint256 _pledgesForDispute,
uint256 _bondSize
) {
_setUpHappyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesForDispute, _bondSize);
_setUpHappyPath(_users, _pledgesForDispute, _bondSize);
_;
}

function _setUpHappyPath(
uint256 _usersToSlash,
uint256 _maxUsersToCheck,
address[] memory _users,
uint256 _pledgesForDispute,
uint256 _bondSize
) internal {
function _setUpHappyPath(address[] memory _users, uint256 _pledgesForDispute, uint256 _bondSize) internal {
vm.assume(_users.length > 0 && _users.length < type(uint16).max);

uint256 _slashAmount = _pledgesForDispute * _bondSize;
Expand Down Expand Up @@ -1589,7 +1583,7 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni
_pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max);
_bondSize = bound(_bondSize, 1, type(uint16).max);

_setUpHappyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesAgainstDispute, _bondSize);
_setUpHappyPath(_users, _pledgesAgainstDispute, _bondSize);

horizonAccountingExtension.setBondedTokensForTest(_cleanPledgers.at(0), 0);

Expand Down Expand Up @@ -1633,7 +1627,7 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni
_pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max);
_bondSize = bound(_bondSize, 1, type(uint16).max);

_setUpHappyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesAgainstDispute, _bondSize);
_setUpHappyPath(_users, _pledgesAgainstDispute, _bondSize);

// Mock and expect the call to oracle checking the dispute status
_mockAndExpect(
Expand Down Expand Up @@ -1686,7 +1680,7 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni
_pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max);
_bondSize = bound(_bondSize, 1, type(uint16).max);

_setUpHappyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesForDispute, _bondSize);
_setUpHappyPath(_users, _pledgesForDispute, _bondSize);

// Mock and expect the call to oracle checking the dispute status
_mockAndExpect(
Expand Down Expand Up @@ -1739,7 +1733,7 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni
_pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max);
_bondSize = bound(_bondSize, 1, type(uint16).max);

_setUpHappyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesForDispute, _bondSize);
_setUpHappyPath(_users, _pledgesForDispute, _bondSize);

// Mock and expect the call to oracle checking the dispute status
_mockAndExpect(
Expand Down

0 comments on commit a2e83e7

Please sign in to comment.