From 64b048722825061534ac45376ecd9a1b5d87555f Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 30 Apr 2020 17:53:17 +0200 Subject: [PATCH] pyln-testing: Just warn if we get an unexpected fee request This was breaking a couple of tests if the pyln version was not synced up with `lightningd`, so now we just warn (these are then collected when running in pytest and highlighted). --- contrib/pyln-testing/pyln/testing/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index 92bde08c0..a5350ce4c 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -21,6 +21,7 @@ import struct import subprocess import threading import time +import warnings BITCOIND_CONFIG = { "regtest": 1, @@ -871,9 +872,10 @@ class LightningNode(object): elif params == [100, 'ECONOMICAL']: feerate = feerates[3] * 4 else: - raise ValueError("Don't have a feerate set for {}/{}.".format( + warnings.warn("Don't have a feerate set for {}/{}.".format( params[0], params[1], )) + feerate = 42 return { 'id': r['id'], 'error': None,