-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
76 150 validator spot limit #19
Conversation
create the Participation struct and the mapping for the validator's participation; create new status for active validator and activate it when initially stake; update the status check of the validator with active where applicable; set the activeFrom the current block number when activate the validator; create new function in the ValidatorSet interface to update the lastlyActive for the validator participation; update the unstaking to take into account the delegation when unstaking full amount; fix tests and write some new ones to cover the new changes;
function getValidators() public view returns (address[] memory) { | ||
return validatorsAddresses; | ||
} | ||
|
||
/** | ||
* @inheritdoc IValidatorSet | ||
*/ | ||
function getCurrentValidatorsCount() public view returns (uint256) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function getCurrentValidatorsCount() public view returns (uint256) { | |
function getActiveValidatorsCount() public view returns (uint256) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
test/ValidatorSet/Staking.test.ts
Outdated
@@ -86,12 +86,25 @@ export function RunStakingTests(): void { | |||
await expect(validatorSet.connect(this.signers.validators[0]).stake({ value: this.minStake })).to.not.be.reverted; | |||
}); | |||
|
|||
it("should get all active validators", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a Staking function to be tested here and it doesn't return active validators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed tests for in Staking for seeing all validators and active count
@@ -301,14 +301,21 @@ describe("ValidatorSet", function () { | |||
expect(currentEpochId, "currentEpochId").to.equal(2); | |||
}); | |||
|
|||
it("should get all active validators - admin", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function doesn't get active validators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name fixed
Now having limit of 150 Validators