Alphabetical internal import order in bitmessagemain
This commit is contained in:
parent
0967f03b40
commit
388de96495
|
@ -7,8 +7,6 @@
|
||||||
# Right now, PyBitmessage only support connecting to stream 1. It doesn't
|
# Right now, PyBitmessage only support connecting to stream 1. It doesn't
|
||||||
# yet contain logic to expand into further streams.
|
# yet contain logic to expand into further streams.
|
||||||
|
|
||||||
# The software version variable is now held in shared.py
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -31,24 +29,23 @@ import time
|
||||||
import traceback
|
import traceback
|
||||||
from struct import pack
|
from struct import pack
|
||||||
|
|
||||||
from helper_startup import (
|
|
||||||
isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections
|
|
||||||
)
|
|
||||||
from singleinstance import singleinstance
|
|
||||||
|
|
||||||
import defaults
|
import defaults
|
||||||
import shared
|
import shared
|
||||||
import knownnodes
|
|
||||||
import state
|
import state
|
||||||
import shutdown
|
import shutdown
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from debug import logger # this should go before any threads
|
from debug import logger # this should go before any threads
|
||||||
|
from helper_startup import (
|
||||||
|
isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections
|
||||||
|
)
|
||||||
from inventory import Inventory
|
from inventory import Inventory
|
||||||
|
from knownnodes import readKnownNodes
|
||||||
# Network objects and threads
|
# Network objects and threads
|
||||||
from network import (
|
from network import (
|
||||||
BMConnectionPool, Dandelion,
|
BMConnectionPool, Dandelion,
|
||||||
AddrThread, AnnounceThread, BMNetworkThread, InvThread, ReceiveQueueThread,
|
AddrThread, AnnounceThread, BMNetworkThread, InvThread, ReceiveQueueThread,
|
||||||
DownloadThread, UploadThread)
|
DownloadThread, UploadThread)
|
||||||
|
from singleinstance import singleinstance
|
||||||
# Synchronous threads
|
# Synchronous threads
|
||||||
from threads import (
|
from threads import (
|
||||||
set_thread_name,
|
set_thread_name,
|
||||||
|
@ -72,14 +69,6 @@ def connectToStream(streamNumber):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with knownnodes.knownNodesLock:
|
|
||||||
if streamNumber not in knownnodes.knownNodes:
|
|
||||||
knownnodes.knownNodes[streamNumber] = {}
|
|
||||||
if streamNumber * 2 not in knownnodes.knownNodes:
|
|
||||||
knownnodes.knownNodes[streamNumber * 2] = {}
|
|
||||||
if streamNumber * 2 + 1 not in knownnodes.knownNodes:
|
|
||||||
knownnodes.knownNodes[streamNumber * 2 + 1] = {}
|
|
||||||
|
|
||||||
BMConnectionPool().connectToStream(streamNumber)
|
BMConnectionPool().connectToStream(streamNumber)
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,7 +268,7 @@ class Main:
|
||||||
defaults.networkDefaultPayloadLengthExtraBytes = int(
|
defaults.networkDefaultPayloadLengthExtraBytes = int(
|
||||||
defaults.networkDefaultPayloadLengthExtraBytes / 100)
|
defaults.networkDefaultPayloadLengthExtraBytes / 100)
|
||||||
|
|
||||||
knownnodes.readKnownNodes()
|
readKnownNodes()
|
||||||
|
|
||||||
# Not needed if objproc is disabled
|
# Not needed if objproc is disabled
|
||||||
if state.enableObjProc:
|
if state.enableObjProc:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user