From 02ba654cda6a888b5549e2d4d2207902ba902a1f Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Thu, 15 Feb 2018 06:07:21 +0000 Subject: [PATCH] test_lightningd: Change test_pay0 to use sendpay. --- tests/test_lightningd.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 8110c5a4ca0f..fdc7894c75ce 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -823,11 +823,19 @@ def test_pay0(self): self.wait_for_routes(l1, [chanid]) # Get any-amount invoice - inv = l2.rpc.invoice("any", "any", 'description')['bolt11'] + inv = l2.rpc.invoice("any", "any", 'description') + rhash = inv['payment_hash'] + + routestep = { + 'msatoshi' : 0, + 'id' : l2.info['id'], + 'delay' : 10, + 'channel' : chanid + } # Amount must be nonzero! self.assertRaisesRegex(ValueError, 'WIRE_AMOUNT_BELOW_MINIMUM', - l1.rpc.pay, inv, 0) + l1.rpc.sendpay, to_json([routestep]), rhash) def test_pay(self): l1,l2 = self.connect()