Skip to content

Commit

Permalink
test_lightningd: Modify test to remove repeated pay attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmnSCPxj committed Feb 15, 2018
1 parent 27b9a31 commit 3a593f3
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions tests/test_lightningd.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,21 +901,6 @@ def fund_from_to_payer(lsrc, ldst, lpayer):
c = self.fund_channel(lsrc, ldst, 10000000)
self.wait_for_routes(lpayer, [c])

# FIXME: This repeated retrying should get implemented
# in lightningd `pay` command directly.
def pay(l, inv):
start_time = time.time()
retry = True
err = None
while retry:
if time.time() > start_time + 10:
raise err
try:
l.rpc.pay(inv)
retry = False
except Exception as errx:
err = errx

## Setup
# Construct lightningd
l1 = self.node_factory.get_node()
Expand All @@ -936,7 +921,7 @@ def pay(l, inv):

## Test
inv = l4.rpc.invoice(1234567, 'inv', 'for testing')['bolt11']
pay(l1, inv)
l1.rpc.pay(inv)

def test_bad_opening(self):
# l1 asks for a too-long locktime
Expand Down

0 comments on commit 3a593f3

Please sign in to comment.