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.