From 0ecd10b27f52366a39dbb0dcf73f73a41ed7044b Mon Sep 17 00:00:00 2001 From: openoms Date: Sat, 27 Aug 2022 22:25:32 +0100 Subject: [PATCH] feeadjuster: exclude list non-required and verbose --- feeadjuster/feeadjuster.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/feeadjuster/feeadjuster.py b/feeadjuster/feeadjuster.py index 9731a76c7..cdb944561 100755 --- a/feeadjuster/feeadjuster.py +++ b/feeadjuster/feeadjuster.py @@ -239,8 +239,13 @@ def feeadjust(plugin: Plugin, scid: str = None): if plugin.fee_strategy == get_fees_median and not plugin.listchannels_by_dst: plugin.channels = plugin.rpc.listchannels()['channels'] channels_adjusted = 0 - with open('feeadjuster-exclude.list') as file: - exclude_list = [l.rstrip("\n") for l in file] + try: + with open('feeadjuster-exclude.list') as file: + exclude_list = [l.rstrip("\n") for l in file] + print("Excluding the channels with the nodes:", exclude_list) + except: + exclude_list = [] + print("There is no feeadjuster-exclude.list given, applying the options to the channels with all peers.") for peer in plugin.peers: if peer["id"] not in exclude_list: for chan in peer["channels"]: