mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
getroute: change definition (and pay default) for riskfactor.
Up until now, riskfactor was useless due to implementation bugs, and also the default setting is wrong (too low to have an effect on reasonable payment scenarios). Let's simplify the definition (by assuming that P(failure) of a node is 1), to make it a simple percentage. I examined the current network fees to see what would work, and under this definition, a default of 10 seems reasonable (equivalent to 1000 under the old definition). It is *this* change which finally fixes our test case! The riskfactor is now 40msat (1500000 * 14 * 10 / 5259600 = 39.9), comparable with worst-case fuzz is 50msat (1001 * 0.05 = 50). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
05f95b59c1
commit
3ae0c20026
@@ -1341,7 +1341,6 @@ def test_pay_routeboost(node_factory, bitcoind):
|
||||
assert [h['channel'] for h in attempts[2]['routehint']] == [r['short_channel_id'] for r in routel3l5]
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_pay_direct(node_factory, bitcoind):
|
||||
"""Check that we prefer the direct route.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user