-
Notifications
You must be signed in to change notification settings - Fork 421
Remove more testutil macros #4220
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
Remove more testutil macros #4220
Conversation
Replace calls to `get_htlc_update_msgs` macro to the identically-named function.
|
I've assigned @valentinewallace as a reviewer! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4220 +/- ##
==========================================
+ Coverage 89.32% 89.35% +0.02%
==========================================
Files 180 180
Lines 138176 138409 +233
Branches 138176 138409 +233
==========================================
+ Hits 123424 123669 +245
+ Misses 12137 12136 -1
+ Partials 2615 2604 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lightning/src/ln/functional_tests.rs
Outdated
| close_channel(&nodes[0], &nodes[1], &chan_1.2, chan_1.3, true); | ||
| let node_a_reason = ClosureReason::CounterpartyInitiatedCooperativeClosure; | ||
| check_closed_event!(nodes[0], 1, node_a_reason, [node_b_id], 100000); | ||
| check_closed_event(&nodes[0], 1, node_a_reason, false, &[node_b_id], 100000); |
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.
Given we pass in false for is_check_discard_funding 99% of the time, it seems like a more ergonomic API would be to have a check_closed_event function without that parameter that gets used most of the time, and a check_closed_event_internal (or something like that) that does support the parameter for the minority of cases that need it. Thoughts?
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.
ok, SGTM
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
68b68e8 to
d976077
Compare
Replace calls to `check_closed_event` macro to the identically-named function.
d976077 to
3ec3492
Compare
valentinewallace
left a comment
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.
LGTM! Probably fine to land with 1 reviewer after CI passes as it's entirely mechanical changes. Some nice rustfmt cleanups in here as well.
Might be a bit painful to review but this removes 2 other macros from the test utils:
get_htlc_update_msgscheck_closed_event