So i have a question how routing works in the LN. I read partly through die RFC described in https://github.com/lightningnetwork/lightning-rfc but I have still this open question.
I know every node in LN has the whole network topology information, so it knows each node and each channel and with that also the capacity of a channel. But the capacity of a channel doesn’t say which side is owning how much. How can we find now a valid route and be sure that there is enough capacity in each channel for the direction which is part of our route?
So for an example lets say I am node A und have a channel to node B and this one has a channel to node C. Lets say each channel has a capacity of 1 BTC, I want to send now 0.4 BTC from A to C and chose the route A -> B -> C. But now it may be that in the channel B – C the node B only owns 0.3 BTC at the moment and node C owns 0.7 BTC. That would mean that B can’t send 0.4 to node C. So if I send now this transaction B would return with an error.
If I have now a longer route the possibility of such an event increases exponentially. So at the end it is very unlikely that my chosen route is valid. How does the protocol prevent a lot of tries until one finds a really valid route?