-
Notifications
You must be signed in to change notification settings - Fork 360
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
MBT: check that clients and connections match those in the model #721
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.
Looks good! One minor comment.
modules/tests/executor/mod.rs
Outdated
// check that clients match | ||
let clients_match = chain.clients.into_iter().all(|(client_id, client)| { | ||
client.heights.into_iter().all(|height| { | ||
// check that each consensus state from the model exists | ||
ctx.consensus_state(&Self::client_id(client_id), Self::height(height)) | ||
.is_some() | ||
}) | ||
}); |
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.
Should we also check that the client states and consensus states are the same in model and chain?
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.
We were already checking that each consensus state that exists in the model (a consensus state is simply a height in the model) also exists in the implementation. I've extended this to also check that the client state height in the implementation is the highest height in the model: 0f06d1f
Do you think that this is enough @ancazamfir?
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.
We were already checking that each consensus state that exists in the model (a consensus state is simply a height in the model)
Ok, I thought it's the same as in the mock context which was recently extended to include a timestamp. I think it's fine for now. Thanks!
Codecov Report
@@ Coverage Diff @@
## master #721 +/- ##
=========================================
+ Coverage 13.6% 44.1% +30.4%
=========================================
Files 69 156 +87
Lines 3752 10393 +6641
Branches 1374 0 -1374
=========================================
+ Hits 513 4584 +4071
- Misses 2618 5809 +3191
+ Partials 621 0 -621
Continue to review full report at Codecov.
|
Closes: #629
Description
For contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.