-
Notifications
You must be signed in to change notification settings - Fork 421
Minor bugfixes and test improvements to #4109 #4182
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
Minor bugfixes and test improvements to #4109 #4182
Conversation
In 6c5ef04 we prevented broadcast of the commitment transactions if the funding transaction has not yet appeared on-chain for manual-broadcast channels to avoid spurious bumps or unbroadcastable transactions. It also updated the documentation on `ChanelMonitor::broadcast_latest_holder_commitment_txn` to explicitly state that it will override the manual-broadcast state and broadcast the latest commitment anyway. However, 4131680 accidentally reverted this behavior by updating `generate_claimable_outpoints_and_watch_outputs`, which is caled by `broadcast_latest_holder_commitment_txn` to also refuse to broadcast if funding has not been seen on chain. Here we fix this, passing through the `require_funding_seen` bool to allow `broadcast_latest_holder_commitment_txn` to broadcast immediately.
|
👋 Thanks for assigning @wpaulino as a reviewer! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4182 +/- ##
==========================================
- Coverage 88.83% 88.83% -0.01%
==========================================
Files 180 180
Lines 137504 137503 -1
Branches 137504 137503 -1
==========================================
- Hits 122155 122150 -5
- Misses 12538 12542 +4
Partials 2811 2811
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:
|
|
👋 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. |
91b71c1 to
59f28e1
Compare
|
✅ Added second reviewer: @jkczyz |
|
Feel free to squash |
In 6c5ef04 we prevented broadcast of the commitment transactions if the funding transaction has not yet appeared on-chain for manual-broadcast channels to avoid spurious bumps or unbroadcastable transactions. However, we missed the case where a channel is closed due to HTLCs timing out. Here we fix that by doing the same broadcast-gating when automatically force-closing a channel due to HTLC timeouts.
This rewrites `test_manual_broadcast_skips_commitment_until_funding` to test manual-broadcast channel closing for both forced-broadcast and close-due-to-HTLC-expiry closes as well as 0-conf and non-0-conf channels.
The remaining two manual-broadcast tests were made redundant by the previous commit which expanded the coverage of the first test. Thus we remove the two other tests.
In `generate_claimable_outpoints_and_watch_outputs` if we're going to decide to return nothing and defer broadcasting the commitment transaction, there's no need to prepare the broadcast tracking objects, so skip it.
59f28e1 to
e1a4259
Compare
|
Backported to 0.2 in #4185. |
No description provided.