lightning-helpers
lightning-helpers copied to clipboard
Failed to 'sendpay' in c-lightning v0.7+
When trying to use the script i am getting following error:
standard route to node: 03ce3f6536a177417af8f2a846bc478384b7d71e748d595f181f3634670ca0b6d2
[{'id': '03ce3f6536a177417af8f2a846bc478384b7d71e748d595f181f3634670ca0b6d2', 'channel': '572922x943x0', 'direction': 0, 'msatoshi': 100000, 'amount_msat': 100000msat, 'delay': 9}]
modified route over node 03ce3f6536a177417af8f2a846bc478384b7d71e748d595f181f3634670ca0b6d2 back to myself
[{'id': '03ce3f6536a177417af8f2a846bc478384b7d71e748d595f181f3634670ca0b6d2', 'channel': '572922x943x0', 'direction': 0, 'msatoshi': 100000, 'amount_msat': 100000msat, 'delay': 18}, {'id': '025a14b8ed40583d67aec92da19453e0b2d1fbbf75f96f85d3dd0ff61a51ee0490', 'channel': '572922x943x0', 'direction': 0, 'msatoshi': -1000, 'amount_msat': 100000msat, 'delay': 9}]
{'payment_hash': '44eeff7dfc5b220f793df5f454fc5faa8a31bddbad73ed73721a49e5c18ab65f', 'expires_at': 1556224830, 'bolt11': 'lnbc10n1pwvyrfwpp5gnh07l0utv3q77fa7h69flzl429rr0wm44e76umjrfy7tsv2ke0sdpuwdjkuerhd96xsmm4wskkjmnkda5kxefdxy6n2d3jxgcnyves9c6nsveexu6scqp2rzjq2qfaym0p6pdlnsnhnz8cac39kcx3atfu8djnealnz7d669c8rhggz9a75qqtxcqqyqqqqqqqqqqqeqq9q2ahfve0zk2g58qw84jxgh9fn7d7m8qghaxh86nsvxwy8yjhmnjfklzev28xnywf5l9mc0mvlcnw2d6mz68qvkt248qxhjdcw2wsxsaspxdx06p'}
Traceback (most recent call last):
File "pay_without_invoice_edited.py", line 106, in <module>
flag = pay_without_invoice(nodeid, amount)
File "pay_without_invoice_edited.py", line 97, in pay_without_invoice
send_the_payment(fullroute)
File "pay_without_invoice_edited.py", line 45, in send_the_payment
res = ln1.sendpay(route, ph)
File "/usr/local/lib/python3.6/site-packages/lightning/lightning.py", line 462, in sendpay
return self.call("sendpay", payload)
File "/usr/local/lib/python3.6/site-packages/lightning/lightning.py", line 220, in call
raise RpcError(method, payload, resp['error'])
lightning.lightning.RpcError: RPC call failed: method: sendpay, payload: {'route': [{'id': '03ce3f6536a177417af8f2a846bc478384b7d71e748d595f181f3634670ca0b6d2', 'channel': '572922x943x0', 'direction': 0, 'msatoshi': 100000, 'amount_msat': 100000msat, 'delay': 18}, {'id': '025a14b8ed40583d67aec92da19453e0b2d1fbbf75f96f85d3dd0ff61a51ee0490', 'channel': '572922x943x0', 'direction': 0, 'msatoshi': -1000, 'amount_msat': 100000msat, 'delay': 9}], 'payment_hash': '44eeff7dfc5b220f793df5f454fc5faa8a31bddbad73ed73721a49e5c18ab65f'}, error: {'code': -32602, 'message': "'msatoshi' should be a millisatoshi amount, not '-1000'"}
My c-lightning version: v0.7.0-36-g92c08cd
For now i dont know what causes issue, perhaps some parameters passed to api are wrong or api works in different way then before.