Fix various bugs and off by one with provisioning

pull/1/head
Mark Veidemanis 4 years ago
parent 7485bbefd1
commit fe86d30155

@ -41,7 +41,10 @@ def emptyChanAllocate(net, flist, relay, new):
allocated = {}
toalloc = len(flist)
if toalloc > sum(chanfree[0].values()):
error("Too many channels to allocate for %s - channels joined since initial query, wait a while" % net)
correction = round(toalloc-sum(chanfree[0].values()) / chanfree[1])
#print("correction", correction)
warn("Ran out of channel spaces, provisioning additional %i relays for %s" % (correction, net))
#newNums = modules.provision.provisionMultipleRelays(net, correction)
return False
for i in chanfree[0].keys():
for x in range(chanfree[0][i]):

Loading…
Cancel
Save