Skip to content

Commit

Permalink
pytest: make test_pay_direct more robust.
Browse files Browse the repository at this point in the history
We had occasional failures, because the fuzz could overwhelm the difference
in routes.  Increasing the amount to 2,000,000 millisatoshis makes the
riskfactor 53msat (2000000 * 14 * 10 / 5259600) which is always greater
than the worst-case fuzz of 5% on the fee of 1002msat.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and cdecker committed Feb 18, 2019
1 parent cb6a971 commit 7a1d13a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ def test_pay_direct(node_factory, bitcoind):
# Try multiple times to ensure that route randomization
# will not override our preference for direct route.
for i in range(8):
inv = l3.rpc.invoice(15000000, 'pay{}'.format(i), 'desc')['bolt11']
inv = l3.rpc.invoice(20000000, 'pay{}'.format(i), 'desc')['bolt11']

l0.rpc.pay(inv)

Expand Down

0 comments on commit 7a1d13a

Please sign in to comment.