Skip to content

Commit 31ac881

Browse files
committed
askrene: don't skip fee_fallback test
The fee_fallback test would fail after fixing the computation of the median. Now by we can restore it by making the probability cost factor 1000x higher than the ratio of the median. This shows how hard it is to combine fee and probability costs and why is the current approach so fragile. Changelog-None Signed-off-by: Lagrang3 <[email protected]>
1 parent e819f5b commit 31ac881

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

plugins/askrene/mcf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static void combine_cost_function(
481481
{
482482
/* probabilty and fee costs are not directly comparable!
483483
* Scale by ratio of (positive) medians. */
484-
const double k = get_median_ratio(working_ctx, linear_network);
484+
const double k = 1000 * get_median_ratio(working_ctx, linear_network);
485485
const struct graph *graph = linear_network->graph;
486486
const size_t max_num_arcs = graph_max_num_arcs(graph);
487487

tests/test_askrene.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ def test_getroutes(node_factory):
441441
'delay': 99 + 6}]])
442442

443443

444-
@pytest.mark.skip
445444
def test_getroutes_fee_fallback(node_factory):
446445
"""Test getroutes call takes into account fees, if excessive"""
447446

0 commit comments

Comments
 (0)