pylightning: add msatoshi optional sendpay param.

And there's a difference between no description and "" as a description:
for no description, listpayments doesn't show the field at all.  So fix
that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-10-23 20:41:33 +10:30
committed by Christian Decker
parent 7eec2253e9
commit f3329d6013

View File

@@ -261,7 +261,7 @@ class LightningRpc(UnixDomainSocketRpc):
"""
return self.call("getinfo")
def sendpay(self, route, payment_hash, description=""):
def sendpay(self, route, payment_hash, description=None, msatoshi=None):
"""
Send along {route} in return for preimage of {payment_hash}
"""
@@ -269,6 +269,7 @@ class LightningRpc(UnixDomainSocketRpc):
"route": route,
"payment_hash": payment_hash,
"description": description,
"msatoshi": msatoshi,
}
return self.call("sendpay", payload)