This repository has been archived on 2024-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-20/src/state.py

75 lines
1.8 KiB
Python
Raw Normal View History

2019-10-22 16:24:37 +02:00
"""
Global runtime variables.
"""
import collections
neededPubkeys = {}
streamsInWhichIAmParticipating = []
extPort = None
2019-10-22 16:24:37 +02:00
"""For UPnP"""
socksIP = None
2019-10-22 16:24:37 +02:00
"""for Tor hidden service"""
2019-10-22 16:24:37 +02:00
appdata = ''
"""holds the location of the application data storage directory"""
2018-04-18 12:34:12 +02:00
shutdown = 0
2019-10-22 16:24:37 +02:00
"""
Set to 1 by the doCleanShutdown function.
Used to tell the proof of work worker threads to exit.
"""
2018-04-09 06:38:48 +02:00
# Component control flags - set on startup, do not change during runtime
# The defaults are for standalone GUI (default operating mode)
2019-10-22 16:24:37 +02:00
enableNetwork = True
"""enable network threads"""
enableObjProc = True
"""enable object processing threads"""
enableAPI = True
"""enable API (if configured)"""
enableGUI = True
"""enable GUI (QT or ncurses)"""
enableSTDIO = False
"""enable STDIO threads"""
2017-02-02 15:48:56 +01:00
curses = False
2019-10-22 16:24:37 +02:00
sqlReady = False
"""set to true by sqlTread when ready for processing"""
maximumNumberOfHalfOpenConnections = 0
invThread = None
addrThread = None
downloadThread = None
uploadThread = None
ownAddresses = {}
trustedPeer = None
2019-10-22 16:24:37 +02:00
"""
If the trustedpeer option is specified in keys.dat then this will
contain a Peer which will be connected to instead of using the
addresses advertised by other peers. The client will only connect to
this peer and the timing attack mitigation will be disabled in order
to download data faster. The expected use case is where the user has
a fast connection to a trusted server where they run a BitMessage
daemon permanently. If they then run a second instance of the client
on a local machine periodically when they want to check for messages
it will sync with the network a lot faster without compromising
security.
"""
discoveredPeers = {}
Peer = collections.namedtuple('Peer', ['host', 'port'])
2017-01-12 19:18:56 +01:00
dandelion = 0
testmode = False
kivy = False
association = ''