mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-16 13:00:58 +02:00
drain: fix receivable and 3ksat margin workaround
This commit is contained in:
parent
eaee585f16
commit
6f0380bdfb
1 changed files with 4 additions and 1 deletions
|
|
@ -97,7 +97,10 @@ def spendable_from_scid(plugin, payload, scid=None):
|
|||
their_reserve = their
|
||||
|
||||
spendable = channel_peer['spendable_msat']
|
||||
receivable = their - their_reserve
|
||||
receivable = channel_peer['receivable_msat']
|
||||
if not receivable:
|
||||
# receivable_msat was added with the 0.8.2 release, have a fallback
|
||||
receivable = their - their_reserve - Millisatoshi('3000sat')
|
||||
return spendable, receivable
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue