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
Replace rounds.generateDelegateList by dpos.getRoundDelegates - Closes #4152 #4154
Replace rounds.generateDelegateList by dpos.getRoundDelegates - Closes #4152 #4154
Conversation
These tests are failing due to #4147 and should be unskiped once fixed
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.
LGTM!
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.
LGTM in general. Just two minor comments and a question :D
const nextForger = delegateList[(slot + offset) % ACTIVE_DELEGATES]; | ||
return seriesCb(nextForger); | ||
}); | ||
library.modules.dpos.getRoundDelegates(round).then(delegateList => { |
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 it doesn't require a big refactor, maybe we can await 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 would suggest creating a new issue to replace use of callbacks in this file and use async/await consistently.
What was the problem?
rounds.generateDelegateList
still being used in the codebaseHow did I solve it?
By replacing every use of
rounds.generateDelegateList
bydpos.getRoundDelegates
.During the replacement, it was identified an issue with
dpos.getRoundDelegates
-> #4147Because of this issue, two tests were skipped and should be unskipped as part of its fix.
How to manually test it?
Green build
Should sync on testnet at least up to height 10000
Review checklist