PyBitmessage-2021-04-27/src/state.py

71 lines
1.3 KiB
Python
Raw Permalink Normal View History

2019-10-22 14:24:37 +00:00
"""
Global runtime variables.
"""
neededPubkeys = {}
streamsInWhichIAmParticipating = []
extPort = None
2019-10-22 14:24:37 +00:00
"""For UPnP"""
socksIP = None
2019-10-22 14:24:37 +00:00
"""for Tor hidden service"""
2019-10-22 14:24:37 +00:00
appdata = ''
"""holds the location of the application data storage directory"""
2018-04-18 10:34:12 +00:00
shutdown = 0
2019-10-22 14:24:37 +00:00
"""
Set to 1 by the `.shutdown.doCleanShutdown` function.
Used to tell the threads to exit.
2019-10-22 14:24:37 +00:00
"""
2018-04-09 04:38:48 +00:00
# Component control flags - set on startup, do not change during runtime
# The defaults are for standalone GUI (default operating mode)
2019-10-22 14:24:37 +00:00
enableNetwork = True
"""enable network threads"""
enableObjProc = True
"""enable object processing thread"""
2019-10-22 14:24:37 +00:00
enableAPI = True
"""enable API (if configured)"""
enableGUI = True
"""enable GUI (QT or ncurses)"""
enableSTDIO = False
"""enable STDIO threads"""
2017-02-02 14:48:56 +00:00
curses = False
maximumNumberOfHalfOpenConnections = 0
maximumLengthOfTimeToBotherResendingMessages = 0
invThread = None
addrThread = None
downloadThread = None
uploadThread = None
ownAddresses = {}
discoveredPeers = {}
dandelion = 0
testmode = False
clientHasReceivedIncomingConnections = False
"""used by API command clientStatus"""
numberOfMessagesProcessed = 0
numberOfBroadcastsProcessed = 0
numberOfPubkeysProcessed = 0
statusIconColor = 'red'
"""
GUI status icon color
.. note:: bad style, refactor it
"""
ackdataForWhichImWatching = {}
thisapp = None
"""Singleton instance"""