Fix circular import in ChanKeep/provisioning modules

This commit is contained in:
Mark Veidemanis 2020-10-28 18:38:27 +00:00
parent 82c5c2d163
commit 913009ab71
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ from utils.logging.log import *
from utils.logging.debug import * from utils.logging.debug import *
from copy import deepcopy from copy import deepcopy
from math import ceil from math import ceil
from modules.provision import provisionMultipleRelays import modules.provision
from twisted.internet.threads import deferToThread from twisted.internet.threads import deferToThread
def allRelaysActive(net): def allRelaysActive(net):
@ -98,12 +98,12 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
return return
if coverAll: if coverAll:
needed = relay-len(main.network[net].relays.keys()) needed = relay-len(main.network[net].relays.keys())
newNums = 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(main.network[net].relays.keys()) needed = sigrelay-len(main.network[net].relays.keys())
newNums = 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)
notifyJoin(net) notifyJoin(net)