Skip to content

Restart the payer with a pending RGB HTLC in close_force_pending_htlc#136

Merged
zoedberg merged 2 commits into
RGB-Tools:masterfrom
dcorral:test/close-force-pending-htlc-restart
Jul 24, 2026
Merged

Restart the payer with a pending RGB HTLC in close_force_pending_htlc#136
zoedberg merged 2 commits into
RGB-Tools:masterfrom
dcorral:test/close-force-pending-htlc-restart

Conversation

@dcorral

@dcorral dcorral commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Restarts the payer in close_force_pending_htlc while the colored HTLC is still pending, so the channel state must round-trip through persistence with an HTLC in flight. Without RGB-Tools/rust-lightning#32 the node fails to come back up at this point, with it the test passes. The rust-lightning submodule is updated to include that fix.

@zoedberg zoedberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please first push only the test and let the CI run so that we see that the test reproduces the bug. Then add the commit that updates the submodule containing the fix

@dcorral
dcorral force-pushed the test/close-force-pending-htlc-restart branch from 9b16672 to fe69ae8 Compare July 24, 2026 12:00
@zoedberg

Copy link
Copy Markdown
Member

@dcorral I noticed the fix is for both inbound and outbound HTLCs, but the test is restarting only one node. Could you also add a node2 restart (before the force-close, mirroring the node1 one) so the test exercises the inbound deserialization path too, not just outbound? That way the regression covers both write sites the fix touches.

@dcorral
dcorral force-pushed the test/close-force-pending-htlc-restart branch from fe69ae8 to 220c8a8 Compare July 24, 2026 12:22
@dcorral

dcorral commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Done, the payee is now restarted as well before the force close, so both the outbound and inbound pending-HTLC paths go through deserialization. Kept the PR test-only for now so CI shows the failure; the submodule update with the fix follows once the red run is on record.

@dcorral
dcorral force-pushed the test/close-force-pending-htlc-restart branch from 4855046 to 220c8a8 Compare July 24, 2026 13:07
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.78%. Comparing base (e10209e) to head (463b244).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   87.74%   87.78%   +0.03%     
==========================================
  Files          13       13              
  Lines        7613     7613              
==========================================
+ Hits         6680     6683       +3     
+ Misses        933      930       -3     
Flag Coverage Δ
rust 87.78% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zoedberg zoedberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@zoedberg
zoedberg merged commit 463b244 into RGB-Tools:master Jul 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants