2
Suppose LND node A wants to send a payment to another node D. The pathfind algorithm based on Dijkstra found a route through B and C and initiates the payment. It fails, as B -> C does not have sufficient balance/bandwidth.
Will LND just fail the payment or try another time with a different route? How does it remember the failed route?
Follow-up question: Can node A figure out, which edge failed?
Edit: To be more clear, in my example, all channels have 0.5BTC as capacity, and all of them have an equal balance distribution of this capacity (0.25, 0.25), except for B -> C, which has (0, 0.5), so B currently cannot send any payments to C.
The balance state (here: (0, 0.5)) is private, but the capacity of all channels is public.
As the routing computation is done in A (source routing), the algorithm initially has no knowledge of the balances. If A just wants to send 0.001BTC, the routing algorithm will find the route, but it cannot reach the target.
Yeah, that is the general aim of
findPath, but as long asbandwidthHintsis not set, it has no "available bandwidth".bandwidthHintsusually is only set for the outgoing channel of A. I also extended my problem description. If it actually sets bandwidth hints from e. g. failed routes, that would exactly be what I am interested in! – wtho – 2019-10-27T15:04:23.167The distribution of the balance in a channel is not public information, so lnd wouldn't know that the funds are all on the side of C in
B->Cbefore attempting to route the payment through the channel. – Murch – 2019-10-27T17:25:43.757