Skip to content

Commit

Permalink
Make fetching storage the first operation
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpringle committed Nov 21, 2024
1 parent 3bb2052 commit a388dc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/validator-manager/PoSValidatorManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ abstract contract PoSValidatorManager is
bytes32 validationID,
address rewardRecipient
) external {
PoSValidatorManagerStorage storage $ = _getPoSValidatorManagerStorage();

if (rewardRecipient == address(0)) {
revert InvalidRewardRecipient(rewardRecipient);
}

PoSValidatorManagerStorage storage $ = _getPoSValidatorManagerStorage();

if ($._posValidatorInfo[validationID].owner != _msgSender()) {
revert UnauthorizedOwner(_msgSender());
}
Expand Down

0 comments on commit a388dc1

Please sign in to comment.