Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staking-contract' into staking-r…
Browse files Browse the repository at this point in the history
…ename
  • Loading branch information
iansuvak committed Sep 19, 2024
2 parents 71230b9 + c1de7d3 commit f01daad
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ abstract contract PoSValidatorManagerTest is ValidatorManagerTest {

event ValidationUptimeUpdated(bytes32 indexed validationID, uint64 uptime);

event GeoffEvent(uint256 num);

event DelegatorAdded(
bytes32 indexed delegationID,
bytes32 indexed validationID,
Expand Down Expand Up @@ -415,6 +413,20 @@ abstract contract PoSValidatorManagerTest is ValidatorManagerTest {
);
}

function testInitializeEndValidationNotOwner() public {
bytes32 validationID = _setUpCompleteValidatorRegistration({
nodeID: DEFAULT_NODE_ID,
subnetID: DEFAULT_SUBNET_ID,
weight: DEFAULT_WEIGHT,
registrationExpiry: DEFAULT_EXPIRY,
blsPublicKey: DEFAULT_BLS_PUBLIC_KEY,
registrationTimestamp: DEFAULT_REGISTRATION_TIMESTAMP
});
vm.prank(address(1));
vm.expectRevert("PoSValidatorManager: validator not owned by sender");
posValidatorManager.initializeEndValidation(validationID, false, 0);
}

function testInitializeEndDelegation() public {
bytes32 validationID = _setUpCompleteValidatorRegistration({
nodeID: DEFAULT_NODE_ID,
Expand Down

0 comments on commit f01daad

Please sign in to comment.