Add channelbalances API call#2196
Conversation
|
@t-bast How should I document this new call in the API documentation? should documentation be part of this PR too? |
Codecov Report
@@ Coverage Diff @@
## master #2196 +/- ##
=======================================
Coverage 83.88% 83.89%
=======================================
Files 186 186
Lines 13920 13917 -3
Branches 553 580 +27
=======================================
- Hits 11677 11675 -2
+ Misses 2243 2242 -1
|
I'll add to the release notes the new |
| canReceive = commitments.availableBalanceForReceive, | ||
| isPublic = commitments.announceChannel) | ||
| isPublic = commitments.announceChannel, | ||
| isEnabled = channelUpdate.channelFlags.isEnabled) |
There was a problem hiding this comment.
Actually there is a subtlety here: isEnabled only applies to our side of the channel, there is a separate channel_update for the other direction (our peer -> us).
Ideally we would expose two bools: sendEnabled and receiveEnabled (our current isEnabled is actually sendEnabled) to have the most accurate data. However the relayer only keeps our own channe_ update, not our peer's channel_update (because we only want to know if we can send, we don't care about receiving).
I really don't think it's worth fixing, unless someone has a very compelling use-case for it, but I thought it was interesting to raise the point.
e8f746d to
298ce80
Compare
The release introduces a few API changes: - channelbalances retrieves information about the balances of all local channels (#2196) - channelbalances and usablebalances return a shortIds object instead of a single shortChannelId (#2323) - stop stops eclair: please note that the recommended way of stopping eclair is simply to kill its process (#2233) - rbfopen lets the initiator of a dual-funded channel RBF the funding transaction (#2275) - listinvoices and listpendinginvoices now accept --count and --skip parameters to limit the number of retrieved items (#2474)
Solves issue #1741 by adding a new API call
channelbalances. This API lists all channel balances, including balances from disabled channels. Channels with zerocanSendbalance that are not shown byusablebalancescan instead be seen withchannelbalances.