How is the route constructed without knowing the balances of channels?
1.1k
avatar for sloppy-weasel-of-politeness
8 months ago by
avatar for sloppy-weasel-of-politeness sloppy-weasel-of-politeness1.2k sats wrote:

My understanding: When a payment is made sats are shifted from local_balance to remote_balance on each node along the route.

I can see balances of channels adjacent to my node:

lncli listchannels

yet not for others channels:

lncli  getnodeinfo $pubkey --include_channels
lncli getchaninfo $chan_id

Only the initial capacity is reported, not balances. So how does the routing work?

ADD INCENTIVE   ADD COMMENTlink written 8 months ago by sloppy-weasel-of-politeness1.2k sats
1.0k
avatar for cooperative-wrasse-of-courage
8 months ago by
avatar for cooperative-wrasse-of-courage cooperative-wrasse-of-courage1.0k sats wrote:

Not every attempt is successful. Your node will learn from unsuccessful attempts, and it will do several attempts before giving up a payment.

Since a good node learns from failures, it will also be possible that trying the same payment again will be successful, even if your first attempt failed.

In short: It succeeds by trying different routes until one is found.

Multipath-payments - where a payment is potentially split up - of course also helps. They have been possible for a while.

ADD COMMENTlink written 8 months ago by cooperative-wrasse-of-courage1.0k sats

Add your answer

Note:

  • Answers should ONLY be used to respond to the original question at the top of this page! Use the ADD COMMENT or ADD REPLY buttons above to respond to someone, ask for clarifications, request more details, etc.
  • Maximum answer length is 500 characters due to limits on Lightning invoice size. After posting you can use comments to expand.
  • Incentive is awarded to signed answers only

Help

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by ln-central open soruce Q&A software running code change a5ae7af8 which was committed 8 months ago