Runnable with both Python3 and Python2, with PyQt4 #2249
|
@ -7,7 +7,7 @@ import time
|
||||||
import protocol
|
import protocol
|
||||||
import state
|
import state
|
||||||
import network.connectionpool # use long name to address recursive import
|
import network.connectionpool # use long name to address recursive import
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from highlevelcrypto import calculateInventoryHash
|
from highlevelcrypto import calculateInventoryHash
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
|
@ -17,7 +17,7 @@ from network import knownnodes
|
||||||
import protocol
|
import protocol
|
||||||
import state
|
import state
|
||||||
import network.connectionpool # use long name to address recursive import
|
import network.connectionpool # use long name to address recursive import
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from bmconfigparser import config
|
from bmconfigparser import config
|
||||||
from queues import invQueue, objectProcessorQueue, portCheckerQueue
|
from queues import invQueue, objectProcessorQueue, portCheckerQueue
|
||||||
from randomtrackingdict import RandomTrackingDict
|
from randomtrackingdict import RandomTrackingDict
|
||||||
|
|
|
@ -8,7 +8,7 @@ from threading import RLock
|
||||||
from time import time
|
from time import time
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from network import connectionpool
|
import network.connectionpool # use long name to address recursive import
|
||||||
import state
|
import state
|
||||||
from queues import invQueue
|
from queues import invQueue
|
||||||
|
|
||||||
|
@ -185,11 +185,11 @@ class Dandelion: # pylint: disable=old-style-class
|
||||||
try:
|
try:
|
||||||
# random two connections
|
# random two connections
|
||||||
self.stem = sample(
|
self.stem = sample(
|
||||||
sorted(connectionpool.BMConnectionPool(
|
sorted(network.connectionpool.BMConnectionPool(
|
||||||
).outboundConnections.values()), MAX_STEMS)
|
).outboundConnections.values()), MAX_STEMS)
|
||||||
# not enough stems available
|
# not enough stems available
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.stem = connectionpool.BMConnectionPool(
|
self.stem = network.connectionpool.BMConnectionPool(
|
||||||
).outboundConnections.values()
|
).outboundConnections.values()
|
||||||
self.nodeMap = {}
|
self.nodeMap = {}
|
||||||
# hashMap stays to cater for pending stems
|
# hashMap stays to cater for pending stems
|
||||||
|
|
|
@ -10,7 +10,7 @@ import protocol
|
||||||
from network import connectionpool
|
from network import connectionpool
|
||||||
from .objectracker import missingObjects
|
from .objectracker import missingObjects
|
||||||
from .threads import StoppableThread
|
from .threads import StoppableThread
|
||||||
import dandelion
|
from network import dandelion
|
||||||
|
|
||||||
|
|
||||||
class DownloadThread(StoppableThread):
|
class DownloadThread(StoppableThread):
|
||||||
|
|
|
@ -9,7 +9,7 @@ import addresses
|
||||||
import protocol
|
import protocol
|
||||||
import state
|
import state
|
||||||
from network import connectionpool
|
from network import connectionpool
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from queues import invQueue
|
from queues import invQueue
|
||||||
from .threads import StoppableThread
|
from .threads import StoppableThread
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from threading import RLock
|
||||||
import six
|
import six
|
||||||
|
|
||||||
import network.connectionpool # use long name to address recursive import
|
import network.connectionpool # use long name to address recursive import
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from randomtrackingdict import RandomTrackingDict
|
from randomtrackingdict import RandomTrackingDict
|
||||||
|
|
||||||
haveBloom = False
|
haveBloom = False
|
||||||
|
|
|
@ -17,7 +17,7 @@ import l10n
|
||||||
import protocol
|
import protocol
|
||||||
import state
|
import state
|
||||||
import network.connectionpool # use long name to address recursive import
|
import network.connectionpool # use long name to address recursive import
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from bmconfigparser import config
|
from bmconfigparser import config
|
||||||
from highlevelcrypto import randomBytes
|
from highlevelcrypto import randomBytes
|
||||||
from queues import invQueue, receiveDataQueue, UISignalQueue
|
from queues import invQueue, receiveDataQueue, UISignalQueue
|
||||||
|
|
|
@ -7,7 +7,7 @@ import helper_random
|
||||||
import protocol
|
import protocol
|
||||||
import state
|
import state
|
||||||
from network import connectionpool
|
from network import connectionpool
|
||||||
import dandelion
|
from network import dandelion
|
||||||
from randomtrackingdict import RandomTrackingDict
|
from randomtrackingdict import RandomTrackingDict
|
||||||
from .threads import StoppableThread
|
from .threads import StoppableThread
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user