-
Notifications
You must be signed in to change notification settings - Fork 458
Update validators from DPoS module - Closes #6876 #6878
Update validators from DPoS module - Closes #6876 #6878
Conversation
51a388a
to
cf9de86
Compare
- Migrate _updateValidators function to new DPoS module - Migrate corresponding tests - Migrate necessary util functions
cf9de86
to
20b061e
Compare
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.
Minor comments, LGTM 🎉
isCurrentlyPunished, | ||
selectStandbyDelegates, | ||
shuffleDelegateList, | ||
validtorsEqual, |
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.
typo
} | ||
const result: Buffer[] = []; | ||
const index = pickStandByDelegate(delegateWeights, randomSeed1); | ||
const [selected] = delegateWeights.splice(index, 1); |
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.
if the below is secondStandby
maybe we can call this firstStandby
?
forgerSelectionZeroStandbyScenario, | ||
forgerSelectionOneStandbyScenario, | ||
forgerSelectionTwoStandbyScenario, | ||
forgerSelectionLessTHan103Scenario, |
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.
THan, typo
]; | ||
const defaultRound = 5; | ||
|
||
for (const scenario of scenarios) { |
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.
Can't we use describe.each
here?
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.
I think we can, but i would keep it like this for now. I just copied from the existing test =)
…/github.com/LiskHQ/lisk-sdk into 6876-dpos_update_validator
…/github.com/LiskHQ/lisk-sdk into 6876-dpos_update_validator
2224e06
to
23448b9
Compare
What was the problem?
This PR resolves #6876
How was it solved?
Migrated from
How was it tested?
Migrate tests from previous dpos