Skip to content

Commit 7d93923

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 8d10d82 commit 7d93923

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
@@ -482,7 +482,7 @@ static void combine_cost_function(
482482
{
483483
/* probabilty and fee costs are not directly comparable!
484484
* Scale by ratio of (positive) medians. */
485-
const double k = get_median_ratio(working_ctx, linear_network);
485+
const double k = 1000 * get_median_ratio(working_ctx, linear_network);
486486
const double ln_30 = log(30);
487487
const struct graph *graph = linear_network->graph;
488488
const size_t max_num_arcs = graph_max_num_arcs(graph);

tests/test_askrene.py

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

554554

555-
@pytest.mark.skip
556555
def test_getroutes_fee_fallback(node_factory):
557556
"""Test getroutes call takes into account fees, if excessive"""
558557

0 commit comments

Comments
 (0)