-
Notifications
You must be signed in to change notification settings - Fork 407
Fix what bolt2_open_channel_sending_node_checks_part1
tests
#1317
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
Fix what bolt2_open_channel_sending_node_checks_part1
tests
#1317
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1317 +/- ##
==========================================
+ Coverage 90.60% 90.68% +0.07%
==========================================
Files 72 72
Lines 40075 41412 +1337
==========================================
+ Hits 36310 37553 +1243
- Misses 3765 3859 +94
Continue to review full report at Codecov.
|
Took a commit to address #1311 (comment) |
There are currently two issues with `bolt2_open_channel_sending_node_checks_part1` which counteract each other and hide that the test isn't testing what it should be. First of all, the final `create_channel` call actually fails because we try to open a channel with ourselves, instead of panicing as the test is supposed to check for. However, when we fix the create_channel call to panic, when we drop `nodes[1]` after `create_channel` panics, we fail the no-pending-messages test as it as an expeted `accept_channel` in its outbound buffer. This causes a double-panic. Previously, these two offset each other - instead of panicing in `create_channel` we'd panic in the Node drop checks. This fixes both by fetching the `accept_channel` before we go into the panic'ing `create_channel` call (who's arguments were corrected).
Its very confusing to have multiple fields that do the same thing, one of which isn't even used for its stated purpose anymore after the previous few commits.
9c6a377
to
6e776d9
Compare
Rebased to update upstream changes which were broken by this change. |
This is split out from #1311.
There are currently two issues with
bolt2_open_channel_sending_node_checks_part1
which counteracteach other and hide that the test isn't testing what it should be.
First of all, the final
create_channel
call actually failsbecause we try to open a channel with ourselves, instead of
panicing as the test is supposed to check for.
However, when we fix the create_channel call to panic, when we
drop
nodes[1]
aftercreate_channel
panics, we fail theno-pending-messages test as it as an expeted
accept_channel
inits outbound buffer. This causes a double-panic.
Previously, these two offset each other - instead of panicing in
create_channel
we'd panic in the Node drop checks.This fixes both by fetching the
accept_channel
before we go intothe panic'ing
create_channel
call (who's arguments werecorrected).