More error handling when joining channels with ChanKeep

This commit is contained in:
Mark Veidemanis 2022-08-02 09:01:24 +01:00
parent 4c9ac3ec42
commit b42c82eac2
1 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,8 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
def joinSingle(net, channel): def joinSingle(net, channel):
eca = emptyChanAllocate(net, [channel], None, []) eca = emptyChanAllocate(net, [channel], None, [])
if not eca:
return False
if not len(eca.keys()) == 1: if not len(eca.keys()) == 1:
return False return False
num = list(eca.keys())[0] num = list(eca.keys())[0]