-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cw4 stake to control valset #29
Conversation
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.
Stake test looks good.
I would definitely prefer literal values for the expected results, but the actual setup and expectations is correct.
I assume this is still pending? And same comment with using more literals for the expected results (and smaller groups) |
It is. Working on it. |
ae31e28
to
e8e670a
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 improvement.
The same can be done in some of the other tests in contract.rs when you work on those.
0dfac7a
to
8f950a7
Compare
Copied from cw4-group + valset tests
8f950a7
to
7c90ec7
Compare
I was trying to do the
So, it seems to me that multi-test In any case, I think this can be reviewed and merged as-is. And I'll open a new issue to debug / fix multi-test |
Oh, I solved it. It's just that I need a It would be nice to improve on the error message, though. It took me a couple of hours (including patching crates and so on) to find and realize this. Update: See CosmWasm/cw-plus#278. |
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.
Looks good. Let's merge it.
We can add more tests later when we optimize the cw4 calls, but this is good sanity checks
@@ -577,9 +538,151 @@ mod test { | |||
assert_eq!(expected, active.validators); | |||
} | |||
|
|||
// TODO: validator list (and modifications) | |||
#[test] | |||
fn validator_list() { |
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 covering this
) | ||
.unwrap(); | ||
|
||
// End block has run now, so active validators list is updated |
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.
perfect
Closes #6.
Based on #5 (cw4-group) tests. Tests are a little redundant and verbose in the name of clarity.
The pair cw4-stake + valset seems to be working well.
Will now add some unit tests to solve the TODOs from #5. Not sure what else needs to be tested.