Rev936, Fix Bootstrapper test without tormanager, Bootstrapper return latest announced peers, Only create 3 threads for passive peers
This commit is contained in:
parent
6cbb6adcfc
commit
08005499fb
6 changed files with 25 additions and 4 deletions
|
@ -46,7 +46,7 @@ class SitePlugin(object):
|
|||
s = time.time()
|
||||
|
||||
need_types = ["ip4"]
|
||||
if self.connection_server and self.connection_server.tor_manager.enabled:
|
||||
if self.connection_server and self.connection_server.tor_manager and self.connection_server.tor_manager.enabled:
|
||||
need_types.append("onion")
|
||||
|
||||
if mode == "start" or mode == "more": # Single: Announce only this site
|
||||
|
|
|
@ -140,6 +140,7 @@ class BootstrapperDb(Db):
|
|||
FROM peer_to_hash
|
||||
LEFT JOIN peer USING (peer_id)
|
||||
WHERE %s
|
||||
ORDER BY date_announced DESC
|
||||
LIMIT :limit
|
||||
""" % where
|
||||
res = self.execute(query, {"hashid": hashid, "ip4": ip4, "onions": onions, "port": port, "limit": limit})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue