diff --git a/src/network/bmobject.py b/src/network/bmobject.py index 35798bb9..67652001 100644 --- a/src/network/bmobject.py +++ b/src/network/bmobject.py @@ -7,7 +7,7 @@ import time import protocol import state import network.connectionpool # use long name to address recursive import -import dandelion +from network import dandelion from highlevelcrypto import calculateInventoryHash logger = logging.getLogger('default') diff --git a/src/network/bmproto.py b/src/network/bmproto.py index 8e3841a4..b3e3fe3c 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -17,7 +17,7 @@ from network import knownnodes import protocol import state import network.connectionpool # use long name to address recursive import -import dandelion +from network import dandelion from bmconfigparser import config from queues import invQueue, objectProcessorQueue, portCheckerQueue from randomtrackingdict import RandomTrackingDict diff --git a/src/network/dandelion.py b/src/network/dandelion.py index 0736a80a..d78cab39 100644 --- a/src/network/dandelion.py +++ b/src/network/dandelion.py @@ -8,7 +8,7 @@ from threading import RLock from time import time import six -from network import connectionpool +import network.connectionpool # use long name to address recursive import import state from queues import invQueue @@ -185,11 +185,11 @@ class Dandelion: # pylint: disable=old-style-class try: # random two connections self.stem = sample( - sorted(connectionpool.BMConnectionPool( + sorted(network.connectionpool.BMConnectionPool( ).outboundConnections.values()), MAX_STEMS) # not enough stems available except ValueError: - self.stem = connectionpool.BMConnectionPool( + self.stem = network.connectionpool.BMConnectionPool( ).outboundConnections.values() self.nodeMap = {} # hashMap stays to cater for pending stems diff --git a/src/network/downloadthread.py b/src/network/downloadthread.py index 34c4b5c3..0962ee14 100644 --- a/src/network/downloadthread.py +++ b/src/network/downloadthread.py @@ -10,7 +10,7 @@ import protocol from network import connectionpool from .objectracker import missingObjects from .threads import StoppableThread -import dandelion +from network import dandelion class DownloadThread(StoppableThread): diff --git a/src/network/invthread.py b/src/network/invthread.py index 8bc1f837..9705b79a 100644 --- a/src/network/invthread.py +++ b/src/network/invthread.py @@ -9,7 +9,7 @@ import addresses import protocol import state from network import connectionpool -import dandelion +from network import dandelion from queues import invQueue from .threads import StoppableThread diff --git a/src/network/objectracker.py b/src/network/objectracker.py index eccbaee3..be2b4219 100644 --- a/src/network/objectracker.py +++ b/src/network/objectracker.py @@ -6,7 +6,7 @@ from threading import RLock import six import network.connectionpool # use long name to address recursive import -import dandelion +from network import dandelion from randomtrackingdict import RandomTrackingDict haveBloom = False diff --git a/src/network/tcp.py b/src/network/tcp.py index 3b27c0f9..3dbc15d2 100644 --- a/src/network/tcp.py +++ b/src/network/tcp.py @@ -17,7 +17,7 @@ import l10n import protocol import state import network.connectionpool # use long name to address recursive import -import dandelion +from network import dandelion from bmconfigparser import config from highlevelcrypto import randomBytes from queues import invQueue, receiveDataQueue, UISignalQueue diff --git a/src/network/uploadthread.py b/src/network/uploadthread.py index e1e8d121..bd5f2d67 100644 --- a/src/network/uploadthread.py +++ b/src/network/uploadthread.py @@ -7,7 +7,7 @@ import helper_random import protocol import state from network import connectionpool -import dandelion +from network import dandelion from randomtrackingdict import RandomTrackingDict from .threads import StoppableThread