From 1b68568fb78097f205d05b23311a777f5d06836a Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 15 Aug 2022 00:07:29 +0100 Subject: [PATCH] Add debugging code in keepChannels --- modules/chankeep.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/chankeep.py b/modules/chankeep.py index f0365ee..e191220 100644 --- a/modules/chankeep.py +++ b/modules/chankeep.py @@ -319,6 +319,8 @@ def keepChannels(net, listinfo, mean, sigrelay, relay): siglist = [i[0] for i in listinfo if int(i[1]) > mean] if len(siglist) > max_chans: max_chans = len(siglist)-1 + debug(f"keepChannels() {net}: siglist:{siglist} max_chans:{max_chans} len_sig:{len(siglist)} len_max:{len(max_chans)}") + chosen = sorted(siglist, reverse=True, key=lambda x: x[1])[:max_chans] debug(f"keepChannels() {net}: joining {len(chosen)}/{len(siglist)} channels") trace(f"keepChannels() {net}: joining:{chosen}")