-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: introduce convenience Status::verify_is_active method #1005
Conversation
0527245
to
a832a83
Compare
Similarly to ChannelEnd::verify_not_closed, introduce a convenience method Status::verify_active which checks whether client’s status is active and returns an error if it isn’t. This simplifies whole bunch of code locations making them more DRY.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1005 +/- ##
=======================================
Coverage 70.69% 70.69%
=======================================
Files 178 178
Lines 17919 17870 -49
=======================================
- Hits 12667 12634 -33
+ Misses 5252 5236 -16 ☔ View full report in Codecov by Sentry. |
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.
Thank you @mina86. This is a straightforward PR.
Just a few comments, then we can wrap it up.
.changelog/unreleased/improvements/1005-status-verify-active.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Farhad Shabani <[email protected]> Signed-off-by: Michal Nazarewicz <[email protected]>
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.
🙏🏻
* feat: introduce convenience Status::verify_active method Similarly to ChannelEnd::verify_not_closed, introduce a convenience method Status::verify_active which checks whether client’s status is active and returns an error if it isn’t. This simplifies whole bunch of code locations making them more DRY. * Update .changelog/unreleased/improvements/1005-status-verify-active.md Co-authored-by: Farhad Shabani <[email protected]> Signed-off-by: Michal Nazarewicz <[email protected]> * review --------- Signed-off-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]>
Similarly to ChannelEnd::verify_not_closed, introduce a convenience
method Status::verify_is_active which checks whether client’s status is
active and returns an error if it isn’t. This simplifies whole bunch
of code locations making them more DRY.
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.