Adding more debug statements in ECA system
This commit is contained in:
parent
73b0518a8f
commit
c4db8ec99d
|
@ -71,6 +71,7 @@ def emptyChanAllocate(net, flist, relay, new):
|
||||||
toalloc = len(flist)
|
toalloc = len(flist)
|
||||||
if toalloc > sum(chanfree[0].values()):
|
if toalloc > sum(chanfree[0].values()):
|
||||||
correction = round(toalloc - sum(chanfree[0].values()) / chanfree[1])
|
correction = round(toalloc - sum(chanfree[0].values()) / chanfree[1])
|
||||||
|
debug(f"emptyChanAllocate() not enough free channels: toalloc:{toalloc} free:{chanfree[0]} chanlimit:{chanfree[1]} correction:{correction}")
|
||||||
warn("Ran out of channel spaces, provisioning additional %i relays for %s" % (correction, net))
|
warn("Ran out of channel spaces, provisioning additional %i relays for %s" % (correction, net))
|
||||||
modules.provision.provisionMultipleRelays(net, correction)
|
modules.provision.provisionMultipleRelays(net, correction)
|
||||||
return False
|
return False
|
||||||
|
@ -133,11 +134,13 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
|
||||||
return
|
return
|
||||||
if coverAll:
|
if coverAll:
|
||||||
needed = relay - len(getActiveRelays(net))
|
needed = relay - len(getActiveRelays(net))
|
||||||
|
debug(f"keepChannels() coverAll asking to provision {needed} relays for {net} relay:{relay}")
|
||||||
newNums = modules.provision.provisionMultipleRelays(net, needed)
|
newNums = modules.provision.provisionMultipleRelays(net, needed)
|
||||||
flist = [i[0] for i in listinfo]
|
flist = [i[0] for i in listinfo]
|
||||||
populateChans(net, flist, relay, newNums)
|
populateChans(net, flist, relay, newNums)
|
||||||
else:
|
else:
|
||||||
needed = sigrelay - len(getActiveRelays(net))
|
needed = sigrelay - len(getActiveRelays(net))
|
||||||
|
debug(f"keepChannels() NOT coverAll asking to provision {needed} relays for {net} sigrelay:{sigrelay}")
|
||||||
newNums = modules.provision.provisionMultipleRelays(net, needed)
|
newNums = modules.provision.provisionMultipleRelays(net, needed)
|
||||||
siglist = [i[0] for i in listinfo if int(i[1]) > mean]
|
siglist = [i[0] for i in listinfo if int(i[1]) > mean]
|
||||||
populateChans(net, siglist, sigrelay, newNums)
|
populateChans(net, siglist, sigrelay, newNums)
|
||||||
|
|
Loading…
Reference in New Issue