From 5532305d76572ecee087bdddb85ebe82d78a6283 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 27 Feb 2020 17:07:18 +0100 Subject: [PATCH] pytest: Unbreak the test_feerate_spam test for elementsd Looking for specific feerates, but not adjusting the amounts involved doesn't work. --- tests/test_connection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index fd819fc74..930a8bc23 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -2207,7 +2207,11 @@ def test_change_chaining(node_factory, bitcoind): def test_feerate_spam(node_factory, chainparams): l1, l2 = node_factory.line_graph(2) - slack = 45000000 + # We constrain the value the funder has at its disposal so we get the + # REMOTE feerate we are looking for below. This may be fragile and depends + # on the transactions we generate. + slack = 45000000 if not chainparams['elements'] else 68000000 + # Pay almost everything to l2. l1.pay(l2, 10**9 - slack)