-
Notifications
You must be signed in to change notification settings - Fork 418
Fix panic when calling batch_funding_transaction_generated
early
#4015
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
base: main
Are you sure you want to change the base?
Conversation
TheBlueMatt
commented
Aug 16, 2025
👋 I see @joostjager was un-assigned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this needs a rebase
👋 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. |
`functional_tests.rs` is a rather large beast, but with this move we take it down to under 10k LoC.
If a user calls `batch_funding_transaction_generated` before a channel is ready to fund its possible to hit an `unwrap` when the transaction-scanning logic attempts to fetch the channel's expected output `scriptPubKey`. While users shouldn't be doing this, we should also avoid the panic, so here check the channel state first. Found by the `full_stack_target` fuzzer.
When a channel gets replaced before we can fund it, its possible now (due to RNG output repetition) to hit the "trying to fund channel before its ready to be funded" error in the `full_stack_target` fuzzer. Thus, we now simply ignore errors when funding.
c20d733
to
c1fefcf
Compare
Rebased. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4015 +/- ##
=======================================
Coverage 88.84% 88.84%
=======================================
Files 175 175
Lines 127723 127762 +39
Branches 127723 127762 +39
=======================================
+ Hits 113472 113516 +44
+ Misses 11686 11679 -7
- Partials 2565 2567 +2
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:
|