Skip to content

Comments

Merge initial and retry stfu send paths#4432

Open
wpaulino wants to merge 2 commits intolightningdevkit:mainfrom
wpaulino:stfu-send-cleanups
Open

Merge initial and retry stfu send paths#4432
wpaulino wants to merge 2 commits intolightningdevkit:mainfrom
wpaulino:stfu-send-cleanups

Conversation

@wpaulino
Copy link
Contributor

In 15b04b5, we fixed a case in `FundedChannel::try_send_stfu` where we'd
send `stfu` unnecessarily for a new splice while one is already pending.
The same case also existed in `FundedChannel::send_stfu`, but was not
fixed. There's no good reason for both of these methods to exist, so we
merge them into one as `FundedChannel::try_send_stfu`. We also add a
test that reproduces the `FundedChannel::send_stfu` issue to ensure it's
fixed and does not regress.

Fixes #4429.

In 15b04b5, we fixed a case in `FundedChannel::try_send_stfu` where we'd
send `stfu` unnecessarily for a new splice while one is already pending.
The same case also existed in `FundedChannel::send_stfu`, but was not
fixed. There's no good reason for both of these methods to exist, so we
merge them into one as `FundedChannel::try_send_stfu`. We also add a
test that reproduces the `FundedChannel::send_stfu` issue to ensure it's
fixed and does not regress.
With the introduction of `QuiescentAction`, the flag has essentially
become duplicate state, so we opt to remove it in favor of just checking
whether we have a pending `FundedChannel::quiescent_action`. Since the
quiescent flags are never persisted, we can simply remove it and update
the other flags, freeing up a bit for future use.
@wpaulino wpaulino added this to the 0.3 milestone Feb 20, 2026
@wpaulino wpaulino requested a review from jkczyz February 20, 2026 23:43
@wpaulino wpaulino self-assigned this Feb 20, 2026
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 20, 2026

👋 Thanks for assigning @jkczyz as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.84%. Comparing base (62c7575) to head (cb92711).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4432      +/-   ##
==========================================
- Coverage   85.87%   85.84%   -0.03%     
==========================================
  Files         157      157              
  Lines      103769   103719      -50     
  Branches   103769   103719      -50     
==========================================
- Hits        89115    89041      -74     
- Misses      12158    12184      +26     
+ Partials     2496     2494       -2     
Flag Coverage Δ
tests 85.84% <100.00%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

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.

Fuzzer hit splice-while-splice-pending debug_assert! in FundedChannel::stfu()

2 participants