Uh oh!
There was an error while loading. Please reload this page.
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:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ldk-reviews-bot
commented
Oct 28, 2025
👋 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
59f28e1Compareldk-reviews-bot
commented
Oct 28, 2025
✅ Added second reviewer: @jkczyz |
wpaulino
commented
Oct 28, 2025
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
e1a4259CompareTheBlueMatt
commented
Oct 29, 2025
Backported to 0.2 in #4185. |
No description provided.