pytest: make test_pay_direct more robust.

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>
This commit is contained in:
Rusty Russell 2019-02-18 13:22:11 +10:30 committed by Christian Decker
parent cb6a97152e
commit 7a1d13a77e
1 changed files with 1 additions and 1 deletions

View File

@ -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)