itest: tolerate deferred HTLC timeout sweeps#10909
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a timing issue where outgoing HTLC timeout resolvers might delay publication of sweep inputs until the next block, even when the input is already mature. By setting the 'Immediate' flag in the sweep parameters, the system ensures these deadline-sensitive transactions are published immediately upon being offered to the sweeper. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the HTLC timeout resolver to sweep inputs immediately by setting the Immediate parameter to true for both timeout transactions and direct HTLC outputs. It also updates the mock sweeper and unit tests to verify this behavior. The review feedback suggests improving code formatting by adding spacing between case stanzas in a select block in the tests, and adding a comment explaining the reasoning behind setting Immediate: true for direct HTLC outputs to ensure consistency and maintainability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🔴 PR Severity: CRITICAL
🔴 Critical (1 file)
🟢 Low (1 file)
⬜ Excluded from severity count (2 files)
AnalysisThis PR modifies The change is small (7 additions, 2 deletions in the production file), but the To override, add a |
f734389 to
32a67df
Compare
32a67df to
171b2b2
Compare
Change Description
The local-claim outgoing HTLC itest assumed Bob's mature timeout sweep is in the mempool immediately after the force-close block is processed. In practice, the resolver can offer the mature input after the sweeper has already processed that block, so publication can wait for the next blockbeat.
This PR updates the itest to accept both valid scheduler outcomes. If the sweep is not in the mempool yet, the test mines an empty block to trigger the next sweep round, then confirms the sweep. No production sweeper or resolver behavior changes are included.
Steps to Test
GOWORK=off make fmtgit diff --check 2a4aab892a8aa48ebdf103726562080f029b7884..HEADGOWORK=off make itest backend=bitcoind dbbackend=postgres nativesql=1 icase=multihop-local_claim_outgoing_htlc_simple_taproot_zero_confGOWORK=off make lintPull Request Checklist
Testing
Code Style and Documentation