Skip to content

Retain anchor reserves when sending all funds#247

Merged
benthecarman merged 1 commit into
lightningdevkit:mainfrom
matbalez:fix/retain-onchain-reserves
Jul 20, 2026
Merged

Retain anchor reserves when sending all funds#247
benthecarman merged 1 commit into
lightningdevkit:mainfrom
matbalez:fix/retain-onchain-reserves

Conversation

@matbalez

Copy link
Copy Markdown
Contributor

Fixes #40.

Summary

  • retain the Anchor-channel reserve when sending all on-chain funds
  • update the gRPC, CLI, and MCP descriptions to match the reserve-retaining behavior
  • add a real-bitcoind end-to-end regression test proving spendable funds drain while the nonzero Anchor reserve remains

Validation

  • focused end-to-end test against real bitcoind
  • root workspace tests (121 passed)
  • root workspace strict Clippy with all features
  • standalone e2e strict Clippy
  • formatting and git diff --check

@ldk-reviews-bot

ldk-reviews-bot commented Jul 20, 2026

Copy link
Copy Markdown

I've assigned @wpaulino 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.

Comment thread e2e-tests/tests/e2e.rs Outdated
Comment thread e2e-tests/tests/e2e.rs Outdated
@matbalez
matbalez marked this pull request as ready for review July 20, 2026 18:46
@ldk-reviews-bot
ldk-reviews-bot requested a review from wpaulino July 20, 2026 18:47
@benthecarman

Copy link
Copy Markdown
Collaborator

can you have it squash? then looks good

Co-authored-by: Mat Balez <60949391+matbalez@users.noreply.github.com>
Signed-off-by: Mat Balez <60949391+matbalez@users.noreply.github.com>
@matbalez
matbalez force-pushed the fix/retain-onchain-reserves branch from 1040f1a to e38a9df Compare July 20, 2026 20:04
@matbalez

Copy link
Copy Markdown
Contributor Author

Squashed the two PR commits into a single commit: e38a9df (Retain anchor reserves when sending all funds). The squashed commit preserves the exact reviewed tree from 1040f1a, so there were no code or content changes during the history rewrite. The required Co-authored-by and Signed-off-by trailers are also retained. CI was re-triggered on the squashed head.

@benthecarman
benthecarman merged commit a2801a0 into lightningdevkit:main Jul 20, 2026
11 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.

Retain on-chain reserves should probably be the default behavior in send_all

3 participants