mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
plugins: minimal 'pay' plugin.
I wrote this sync first, then rewrote async, then developed libplugin. But committing all that just wastes reviewer time, so I present it as if it was always asnc and using the library helper. Currently the command it registers is 'pay2', but when it's complete we'll remove the internal 'pay' and rename it. This does a single 'getroute/sendpay' call. No retries, no options. Shockingly, this by itself is almost sufficient to pass our current test suite with `pay`->`pay2`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
de4043a32a
commit
ad1e1bd528
@@ -108,3 +108,11 @@ def test_failing_plugins():
|
||||
'--plugin={}'.format(p),
|
||||
'--help',
|
||||
])
|
||||
|
||||
|
||||
def test_pay_plugin(node_factory):
|
||||
l1, l2 = node_factory.line_graph(2)
|
||||
inv = l2.rpc.invoice(123000, 'label', 'description', 3700)
|
||||
|
||||
res = l1.rpc.pay2(bolt11=inv['bolt11'])
|
||||
assert res['status'] == 'complete'
|
||||
|
||||
Reference in New Issue
Block a user