Use DNS seed only if knownnodes are empty #1325

Merged
g1itch merged 1 commits from dns into v0.6 2018-08-02 11:23:37 +02:00
Showing only changes of commit 342e2a209c - Show all commits

View File

@ -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"))