-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add warnings when provider unbonding is shorter than consumer unbonding #858
Add warnings when provider unbonding is shorter than consumer unbonding #858
Conversation
The quality gate is a bit unhelpful here: The new code is in an area where we have 0% test coverage at the moment, since it is concerned with the CLI, for which there are no unit tests. I added tests for my new functionality as much as possible. I'm not sure how to cover more code here, but am open to suggestions. Alternatively, we can ignore the code coverage for this one. |
…https://github.com/cosmos/interchain-security into ph/733-unbonding-period-on-consumers-is-not-enforced
Summary of changes since the reviews:
|
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.
New changes look good.
Approve!
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.
One comment but LGTM!
Description
Changes the client code for creating consumer addition proposals so that a warning is printed when
the unbonding period in the proposal is >= than the unbonding period of the provider.
To test anything here, I needed to create a mock of the CometBFT RPC client. I didn't find anything like this elsewhere, but lmk if it already exists.
For the error message, I don't think the logger in the app is in scope here, so I just print to stderr.
Linked issues
Closes: #733
Type of change
If you've checked more than one of the first three boxes, consider splitting this PR into multiple PRs!
Feature
: Changes and/or adds code behavior, irrelevant to bug fixesFix
: Changes and/or adds code behavior, specifically to fix a bugRefactor
: Changes existing code style, naming, structure, etc.Testing
: Adds testingDocs
: Adds documentationNew behavior tests
Added a test for the logic that checks unbonding periods of provider and consumer against each other.
Versioning Implications
If the above box is checked, which version should be bumped?
MAJOR
: Consensus breaking changes to both the provider and consumers(s), including updates/breaking changes to IBC communication between provider and consumer(s)MINOR
: Consensus breaking changes which affect either only the provider or only the consumer(s)PATCH
: Non consensus breaking changesTargeting
Please select one of the following: