Emphasize more magic imports in the network package
This commit is contained in:
parent
f6adb46ce6
commit
b99670430f
|
@ -3,13 +3,13 @@ Announce addresses as they are received from other hosts
|
||||||
"""
|
"""
|
||||||
from six.moves import queue
|
from six.moves import queue
|
||||||
|
|
||||||
|
# magic imports!
|
||||||
import state
|
import state
|
||||||
from helper_random import randomshuffle
|
from helper_random import randomshuffle
|
||||||
from protocol import assembleAddrMessage
|
from protocol import assembleAddrMessage
|
||||||
|
from queues import addrQueue # FIXME: init with queue
|
||||||
from network.connectionpool import BMConnectionPool
|
from network.connectionpool import BMConnectionPool
|
||||||
from queues import addrQueue
|
|
||||||
from threads import StoppableThread
|
from threads import StoppableThread
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,12 @@ Announce myself (node address)
|
||||||
"""
|
"""
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
# magic imports!
|
||||||
import state
|
import state
|
||||||
from bmconfigparser import config
|
from bmconfigparser import config
|
||||||
from protocol import assembleAddrMessage
|
from protocol import assembleAddrMessage
|
||||||
|
|
||||||
from network.connectionpool import BMConnectionPool
|
from network.connectionpool import BMConnectionPool
|
||||||
|
|
||||||
from node import Peer
|
from node import Peer
|
||||||
from threads import StoppableThread
|
from threads import StoppableThread
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import struct
|
||||||
import time
|
import time
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
|
|
||||||
|
# magic imports!
|
||||||
import addresses
|
import addresses
|
||||||
import connectionpool
|
import connectionpool
|
||||||
import knownnodes
|
import knownnodes
|
||||||
|
@ -18,22 +19,24 @@ import protocol
|
||||||
import state
|
import state
|
||||||
from bmconfigparser import config
|
from bmconfigparser import config
|
||||||
from inventory import Inventory
|
from inventory import Inventory
|
||||||
|
from queues import invQueue, objectProcessorQueue, portCheckerQueue
|
||||||
|
from randomtrackingdict import RandomTrackingDict
|
||||||
from network.advanceddispatcher import AdvancedDispatcher
|
from network.advanceddispatcher import AdvancedDispatcher
|
||||||
from network.bmobject import (
|
from network.bmobject import (
|
||||||
BMObject, BMObjectAlreadyHaveError, BMObjectExpiredError,
|
BMObject, BMObjectAlreadyHaveError, BMObjectExpiredError,
|
||||||
BMObjectInsufficientPOWError, BMObjectInvalidError,
|
BMObjectInsufficientPOWError, BMObjectInvalidError,
|
||||||
BMObjectUnwantedStreamError
|
BMObjectUnwantedStreamError
|
||||||
)
|
)
|
||||||
from network.constants import (
|
from network.dandelion import Dandelion
|
||||||
|
from network.proxy import ProxyError
|
||||||
|
|
||||||
|
from constants import (
|
||||||
ADDRESS_ALIVE, MAX_MESSAGE_SIZE, MAX_OBJECT_COUNT,
|
ADDRESS_ALIVE, MAX_MESSAGE_SIZE, MAX_OBJECT_COUNT,
|
||||||
MAX_OBJECT_PAYLOAD_SIZE, MAX_TIME_OFFSET
|
MAX_OBJECT_PAYLOAD_SIZE, MAX_TIME_OFFSET
|
||||||
)
|
)
|
||||||
from network.dandelion import Dandelion
|
|
||||||
from network.proxy import ProxyError
|
|
||||||
from node import Node, Peer
|
from node import Node, Peer
|
||||||
from objectracker import ObjectTracker, missingObjects
|
from objectracker import ObjectTracker, missingObjects
|
||||||
from queues import invQueue, objectProcessorQueue, portCheckerQueue
|
|
||||||
from randomtrackingdict import RandomTrackingDict
|
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import random
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
# magic imports!
|
||||||
import addresses
|
import addresses
|
||||||
import helper_random
|
import helper_random
|
||||||
import l10n
|
import l10n
|
||||||
|
@ -23,9 +24,9 @@ from tr import _translate
|
||||||
import asyncore_pollchoose as asyncore
|
import asyncore_pollchoose as asyncore
|
||||||
import connectionpool
|
import connectionpool
|
||||||
import knownnodes
|
import knownnodes
|
||||||
|
from constants import MAX_OBJECT_COUNT
|
||||||
from network.advanceddispatcher import AdvancedDispatcher
|
from network.advanceddispatcher import AdvancedDispatcher
|
||||||
from network.bmproto import BMProto
|
from network.bmproto import BMProto
|
||||||
from network.constants import MAX_OBJECT_COUNT
|
|
||||||
from network.dandelion import Dandelion
|
from network.dandelion import Dandelion
|
||||||
from network.objectracker import ObjectTracker
|
from network.objectracker import ObjectTracker
|
||||||
from network.socks4a import Socks4aConnection
|
from network.socks4a import Socks4aConnection
|
||||||
|
|
Reference in New Issue
Block a user