Skip to content
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

itest: add a PoC for refilling channel balance #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yyforyongyu
Copy link
Owner

Suppose a route Alice -> Bob -> Carol. Bob doesn't have enough outgoing liquidity to forward a payment sent from Alice to Carol. This PR adds an itest to show that, with the help of htlc interceptor, Bob can make the payment when his outgoing channel is refilled. The test setup,

  1. Channel setup: Alice -> Bob -> Carol.
  2. Bob sends payment to Carol, so his outgoing liquidity is drained.
  3. Alice sends a payment to Carol via Bob, with Bob intercepting the HTLC and putting the payment on hold.
  4. Carol sends payment to Bob, which refills Bob's outgoing liquidity.
  5. Bob releases the HTLC.
  6. Alice's payment is now succeeded.

Copy link

Pull reviewers stats

Stats of the last 30 days for lnd:

User Total reviews Time to review Total comments

@coveralls
Copy link

coveralls commented Jun 27, 2024

Pull Request Test Coverage Report for Build 9701570315

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 170 unchanged lines in 24 files lost coverage.
  • Overall coverage decreased (-0.06%) to 58.386%

Files with Coverage Reduction New Missed Lines %
sweep/fee_bumper.go 1 93.12%
log.go 2 93.2%
discovery/sync_manager.go 2 91.2%
chainntnfs/btcdnotify/btcd.go 2 82.78%
htlcswitch/switch.go 2 82.29%
lnrpc/lightning_grpc.pb.go 2 36.58%
lnwallet/rpcwallet/rpcwallet.go 3 72.02%
contractcourt/breach_resolver.go 3 88.33%
peer/ping_manager.go 3 84.85%
lnwallet/rpcwallet/healthcheck.go 3 58.82%
Totals Coverage Status
Change from base Build 9681515217: -0.06%
Covered Lines: 123312
Relevant Lines: 211201

💛 - Coveralls

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