Implement ChanKeep joining functions
* Low-key channel joining with incrementally increasing delay * Spin up needed instances to be able to cover a certain channel space * Fix provisioning functions to prevent race conditions with lots of relays being created at once * Tweakable switchover from covering all channels to only covering channels with more users than the mean of the cumulative user count
This commit is contained in:
@@ -17,14 +17,16 @@ class Network:
|
||||
self.security = security
|
||||
self.auth = auth
|
||||
|
||||
self.last = 0
|
||||
self.last = 1
|
||||
self.relays = {}
|
||||
self.aliases = {}
|
||||
|
||||
def add_relay(self, num=None):
|
||||
if not num:
|
||||
self.last += 1
|
||||
num = self.last
|
||||
self.last += 1
|
||||
elif num == self.last:
|
||||
self.last += 1
|
||||
self.relays[num] = {
|
||||
"enabled": main.config["ConnectOnCreate"],
|
||||
"net": self.net,
|
||||
|
||||
Reference in New Issue
Block a user