From a7adb517ca3d2b2e6c382d9c31d66bb507ed2b7b Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sun, 26 Aug 2018 02:47:43 +0200 Subject: [PATCH] Only return small number of peers if no new site added by the peer --- plugins/disabled-Bootstrapper/BootstrapperPlugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/disabled-Bootstrapper/BootstrapperPlugin.py b/plugins/disabled-Bootstrapper/BootstrapperPlugin.py index d5af9bb9..753bc390 100644 --- a/plugins/disabled-Bootstrapper/BootstrapperPlugin.py +++ b/plugins/disabled-Bootstrapper/BootstrapperPlugin.py @@ -84,7 +84,7 @@ class FileRequestPlugin(object): if params.get("onions") and not all_onions_signed and hashes_changed: back["onion_sign_this"] = "%.0f" % time.time() # Send back nonce for signing - if len(hashes) > 500: + if len(hashes) > 500 or not hashes_changed: limit = 5 order = False else: @@ -103,7 +103,6 @@ class FileRequestPlugin(object): peers.append(hash_peers) time_peerlist = time.time() - s - back["peers"] = peers self.connection.log( "Announce %s sites (onions: %s, onion_check: %.3fs, db_onion: %.3fs, db_ip4: %.3fs, peerlist: %.3fs)" %