Skip to content

Commit

Permalink
renames and ut
Browse files Browse the repository at this point in the history
  • Loading branch information
Manoj Patra committed Sep 18, 2023
1 parent 27d0002 commit 0dbe7f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/PermissionedNodeRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ contract PermissionedNodeRegistry is
/**
* @notice update the name of an operator
* @dev only operator msg.sender can update
* @param _operatorName new Name of the operator
* @param _operatorName new name of the operator
*/
function updateOperatorName(string calldata _operatorName) external override {
IPoolUtils(staderConfig.getPoolUtils()).onlyValidName(_operatorName);
Expand Down
2 changes: 1 addition & 1 deletion contracts/PermissionlessNodeRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ contract PermissionlessNodeRegistry is
/**
* @notice update the name of an operator
* @dev only operator msg.sender can update
* @param _operatorName new Name of the operator
* @param _operatorName new name of the operator
*/
function updateOperatorName(string calldata _operatorName) external override {
IPoolUtils(staderConfig.getPoolUtils()).onlyValidName(_operatorName);
Expand Down
4 changes: 4 additions & 0 deletions test/foundry_tests/PermissionedNodeRegistry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ contract PermissionedNodeRegistryTest is Test {
vm.prank(operatorAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, newOPRewardAddr);

// passed wrong new reward address by mistake
vm.prank(opRewardAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, vm.addr(666));

vm.prank(opRewardAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, newOPRewardAddr);

Expand Down
4 changes: 4 additions & 0 deletions test/foundry_tests/PermissionlessNodeRegistry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ contract PermissionlessNodeRegistryTest is Test {
vm.prank(operatorAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, newOPRewardAddr);

// passed wrong new reward address by mistake
vm.prank(opRewardAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, vm.addr(666));

vm.prank(opRewardAddr);
nodeRegistry.initiateRewardAddressChange(operatorAddr, newOPRewardAddr);

Expand Down

0 comments on commit 0dbe7f1

Please sign in to comment.