ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.84k stars 901 forks source link

Feature request: receivable_msat #3555

Closed m-schmoock closed 4 years ago

m-schmoock commented 4 years ago

Add receivable_msat to listpeers 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 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.

Among others this will allow to finish drain plugin, specifically the fill command, in a clean way: https://github.com/lightningd/plugins/pull/71

m-schmoock commented 4 years ago

Addressed by #3572