Currently (0.5.1), usablebalances will not list a channel which is disabled as per the channelFlags in the outgoing/payable direction (and maybe under other circumstances that we have not been made aware of). Furthermore, we have been told by @t-bast that the canReceive and canSend values from the usablebalances result can be strictly positive (more than zero) even if the channel is disabled in the respective direction.
We think that unless the LN spec semantics suggest otherwise, all channels should be listed in the result for the usablebalances command, regardless of their incoming or outgoing balances and wether or not they are disabled in any direction for wathever reasons. Furthermore, if a channel is somehow disabled in a direction or in both directions, the respective canReceive and canReceive values should be set to zero (0), regardless of the actual balances, because that's what the "can" in canReceive and canSend means in natural language.
The first bug here is that If your node has a channel with only an incoming balance, that channel will not appear in the usablebalances API call result where it should. The second bug is that a disabled channel could appear with a non-null balance in its canReceive or canSend field.
Any node with a channel with only an incoming balances can reproduce the issue.
We are using eclair 0.5.1 pre-compiled, downloaded from Github.
The OS is Ubuntu 20.04, the JRE is AdoptOpenJDK 11.0.10.
We were asked to produce a bug report for this issue by @t-bast following a private Gitter conversation.
Currently (0.5.1),
usablebalanceswill not list a channel which is disabled as per thechannelFlagsin the outgoing/payable direction (and maybe under other circumstances that we have not been made aware of). Furthermore, we have been told by @t-bast that thecanReceiveandcanSendvalues from theusablebalancesresult can be strictly positive (more than zero) even if the channel is disabled in the respective direction.We think that unless the LN spec semantics suggest otherwise, all channels should be listed in the result for the
usablebalancescommand, regardless of their incoming or outgoing balances and wether or not they are disabled in any direction for wathever reasons. Furthermore, if a channel is somehow disabled in a direction or in both directions, the respectivecanReceiveandcanReceivevalues should be set to zero (0), regardless of the actual balances, because that's what the "can" incanReceiveandcanSendmeans in natural language.The first bug here is that If your node has a channel with only an incoming balance, that channel will not appear in the
usablebalancesAPI call result where it should. The second bug is that a disabled channel could appear with a non-null balance in itscanReceiveorcanSendfield.Any node with a channel with only an incoming balances can reproduce the issue.
We are using eclair 0.5.1 pre-compiled, downloaded from Github.
The OS is Ubuntu 20.04, the JRE is AdoptOpenJDK 11.0.10.
We were asked to produce a bug report for this issue by @t-bast following a private Gitter conversation.