-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ interface IWithdrawalVault { | |
function getWithdrawalRequestFee() external view returns (uint256); | ||
} | ||
|
||
|
||
contract ValidatorsExitBus is AccessControlEnumerable { | ||
using UnstructuredStorage for bytes32; | ||
|
||
|
@@ -75,6 +74,7 @@ contract ValidatorsExitBus is AccessControlEnumerable { | |
/// @dev This function verifies that the hash of the provided exit request data exists in storage | ||
// and ensures that the events for the requests specified in the `keyIndexes` array have already been delivered. | ||
function triggerExits(ExitRequestData calldata request, uint256[] calldata keyIndexes) external payable { | ||
uint256 prevBalance = address(this).balance - msg.value; | ||
RequestStatus storage requestStatus = _storageExitRequestsHashes()[keccak256(abi.encode(request.data, request.dataFormat))]; | ||
bytes calldata data = request.data; | ||
|
||
|
@@ -90,8 +90,6 @@ contract ValidatorsExitBus is AccessControlEnumerable { | |
revert InsufficientPayment(withdrawalFee, keyIndexes.length, msg.value); | ||
} | ||
|
||
// uint256 prevBalance = address(this).balance - msg.value; | ||
|
||
uint256 lastDeliveredKeyIndex = requestStatus.deliveredItemsCount - 1; | ||
|
||
bytes memory pubkeys = new bytes(keyIndexes.length * PUBLIC_KEY_LENGTH); | ||
|
@@ -136,7 +134,7 @@ contract ValidatorsExitBus is AccessControlEnumerable { | |
emit MadeRefund(msg.sender, refund); | ||
} | ||
|
||
// assert(address(this).balance == prevBalance); | ||
assert(address(this).balance == prevBalance); | ||
} | ||
Check warning Code scanning / Slither Dangerous strict equalities Medium
ValidatorsExitBus.triggerExits(ValidatorsExitBus.ExitRequestData,uint256[]) uses a dangerous strict equality:
- assert(bool)(address(this).balance == prevBalance) |
||
|
||
function _storeExitRequestHash( | ||
|