-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix tests of Staking for Crab #331
Conversation
I found here are various TODOs need to be done in Staking's tests: Discussion Category
Fixed CategorySome TODOs I just fixed without changing any code, unconsciously, need to be reviewed also. Trying Category
|
|
Base on the latest substrate tests. And do some modification. |
Yep, and this series can not just referring substrate's test cases in |
Yep, this is the last step of this pr. |
But our apis ( |
Okay, I'll try to fix the |
3 Questions
darwinia/frame/staking/src/mock.rs Line 27 in 19f9355
darwinia/frame/staking/src/mock.rs Line 42 in 19f9355
darwinia/frame/staking/src/mock.rs Line 44 in 19f9355
darwinia/frame/staking/src/lib.rs Line 628 in 19f9355
NoteI'm not sure if the questions before cause the |
|
The reward of validating is decided by the The direct effect of using If an For nominatordarwinia/frame/staking/src/lib.rs Line 1852 in 19f9355
For validatordarwinia/frame/staking/src/lib.rs Line 1862 in 19f9355
|
Please read the gene paper. And understand what power is. |
Well, I know the Please checkout this function: darwinia/frame/staking/src/lib.rs Line 1840 in 19f9355
This concept decides how I fix the reward tests(because this part is different from substrate), if there is no problem, I'll fix them to follow the design. |
We use power instead of balance value to represent the contribution of validators/nominators(validators can contribute too), so does the rewards. It's by design, not sure this answers your question? |
Review GuideAll un-fixed problems have been tagged by
NoteThe left problems are all about darwinia features, considering the difficulty of review the whole test files, I think we might merge this pr after passing the Travis' tests, then @yakio and I can divide the tests(whatever you choose, I prefer to fix the easier part...) |
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.
Thanks for the help. I will work on these after merging.
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.
All <Module<Test>>
can be replace with Staking
, but it's ok.
* Decouple backend access from EthApi * Module instead arbitrary struct * Fix checker
#325
Update Steps
v2.0.0.alpha.3
LockFor
ValidatorPrefs
BondDurationInEra
Need to separate into other prs
Both
power
,reward
.(marked)unbond
method(marked)darwinia_tests
slash_validators
issue(marked)