In order to know how much is currently able to receive on a channel (with one transaction) we may want to have receivable_msat / receivable_msatoshi in listpeers output similar to spendable_msat.
A remote may still reject to send that much through a channel for other reasons, but receivable_msat should reflect the technical maximum: total - reserves - 1x funders on-chain HTLC fees at current rate.
Add
receivable_msat
tolistpeers
channels output.In order to know how much is currently able to receive on a channel (with one transaction) we may want to have
receivable_msat
/receivable_msatoshi
inlistpeers
output similar tospendable_msat
.A remote may still reject to send that much through a channel for other reasons, but
receivable_msat
should reflect the technical maximum:total - reserves - 1x funders on-chain HTLC fees at current rate.
Among others this will allow to finish drain plugin, specifically the
fill
command, in a clean way: https://github.com/lightningd/plugins/pull/71