-
Notifications
You must be signed in to change notification settings - Fork 353
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
[multi-test] Add staking and distribution module #782
Conversation
22c89db
to
524c632
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.
Nice start.
The two big TODO are obvious missing points you mentioned to me.
I designed this to be possible. Probably need 30 minutes in the morning to push such a commit that will compile and do that
24bf15b
to
e6255be
Compare
This now allows adding multiple validators and the rewards are calculated based on a configurable APR, the validator's commission and the elapsed time, so you can just change Looks like tarpaulin flags a lot of lines that are covered. |
Can't wait for this! |
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.
The code looks fine! I can't easily verify this is precisely how staking/distribution works, so I'm taking that on faith.
@chipshort In reward formula remember to subtract the validator commision |
That should already be the case in let commission = reward * validator_commission;
reward - commission |
…ibutionKeeper and StakeKeeper modules
Co-authored-by: Tomasz Kurcz <uint@lavabit.com>
42b927d
to
f02f345
Compare
Closes #753
Implementation of Staking and Distribution modules in multitest package, which allows now to test staking and delegation.