Skip to content

Commit

Permalink
test_lightningd: Change test_pay0 to use sendpay.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmnSCPxj authored and cdecker committed Feb 16, 2018
1 parent d9163db commit 0489c7e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_lightningd.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,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()
Expand Down

0 comments on commit 0489c7e

Please sign in to comment.