From 342e2a209c8cc5349bc26236410a2b86c442201f Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 22 Jul 2018 19:24:08 +0300 Subject: [PATCH] Use DNS seed only if knownnodes are empty --- src/network/connectionpool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/connectionpool.py b/src/network/connectionpool.py index 7854dec1..fa098411 100644 --- a/src/network/connectionpool.py +++ b/src/network/connectionpool.py @@ -8,6 +8,7 @@ import re from bmconfigparser import BMConfigParser from debug import logger import helper_bootstrap +from knownnodes import knownNodes from network.proxy import Proxy from network.tcp import TCPServer, Socks5BMConnection, Socks4aBMConnection, TCPConnection from network.udp import UDPSocket @@ -138,8 +139,9 @@ class BMConnectionPool(object): acceptConnections = False if spawnConnections: - if not self.bootstrapped: + if not any([knownNodes.iteritems()]): helper_bootstrap.dns() + if not self.bootstrapped: self.bootstrapped = True Proxy.proxy = (BMConfigParser().safeGet("bitmessagesettings", "sockshostname"), BMConfigParser().safeGetInt("bitmessagesettings", "socksport"))