Pass a list instead of listinfo

This commit is contained in:
Mark Veidemanis 2022-08-15 00:29:08 +01:00
parent a9592a85d0
commit 2b7bd486f1
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 1 deletions

View File

@ -306,6 +306,7 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
if len(flist) > max_chans: if len(flist) > max_chans:
max_chans = len(flist) - 1 max_chans = len(flist) - 1
chosen = sorted(flist, reverse=True, key=lambda x: x[1])[:max_chans] chosen = sorted(flist, reverse=True, key=lambda x: x[1])[:max_chans]
chosen = [i[0] for i in chosen]
debug(f"keepChannels() {net}: joining {len(chosen)}/{len(flist)} channels") debug(f"keepChannels() {net}: joining {len(chosen)}/{len(flist)} channels")
trace(f"keepChannels() {net}: joining:{chosen}") trace(f"keepChannels() {net}: joining:{chosen}")
@ -321,7 +322,7 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
if len(siglist) > max_chans: if len(siglist) > max_chans:
max_chans = len(siglist) - 1 max_chans = len(siglist) - 1
chosen = sorted(siglist, reverse=True, key=lambda x: x[1])[:max_chans] chosen = sorted(siglist, reverse=True, key=lambda x: x[1])[:max_chans]
siglist = [i[0] for i in siglist] chosen = [i[0] for i in chosen]
debug(f"keepChannels() {net}: siglist:{siglist} max_chans:{max_chans} len_sig:{len(siglist)}") debug(f"keepChannels() {net}: siglist:{siglist} max_chans:{max_chans} len_sig:{len(siglist)}")
debug(f"keepChannels() {net}: joining {len(chosen)}/{len(siglist)} channels") debug(f"keepChannels() {net}: joining {len(chosen)}/{len(siglist)} channels")