Author: ZmnSCPxj 2018-04-11 03:04:09
Published on: 2018-04-11T03:04:09+00:00
The node gossip does not reveal the channel balance of each peer, which is effectively the amount of money each peer owns on that channel. It is because you do not want to report your balance and any changes in it to the entire network. Therefore, you cannot expect to receive such updates from anyone else either. Real-life implementations like c-lightning get payment routes through brute-force trial-and-error. If one channel on a route fails, they mark it as temporarily unusable and plot a new route that does not include that channel. However, you can easily get the channel total capacity for each channel. Each published channel has a short channel id composed of blockheight, transaction index within block, and output index within transaction. This identifies a specific txout on the blockchain you are using. If that txout is unspent, then the value of that UTXO is the total channel capacity. C-lightning records this but does not use the total channel capacity yet.
Updated on: 2023-05-24T22:03:11.980653+00:00