drain: fix receivable and 3ksat margin workaround

This commit is contained in:
Michael Schmoock
2020-03-05 19:39:22 +01:00
committed by Christian Decker
parent eaee585f16
commit 6f0380bdfb

View File

@@ -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