Fixed some docstrings in shared and state
This commit is contained in:
parent
f18f534c48
commit
aa7e7dd658
|
@ -80,7 +80,9 @@ def isAddressInMySubscriptionsList(address):
|
|||
|
||||
|
||||
def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address):
|
||||
"""Am I subscribed to this address, is it in my addressbook or whitelist?"""
|
||||
"""
|
||||
Am I subscribed to this address, is it in my addressbook or whitelist?
|
||||
"""
|
||||
if isAddressInMyAddressBook(address):
|
||||
return True
|
||||
|
||||
|
@ -100,8 +102,12 @@ def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address):
|
|||
return False
|
||||
|
||||
|
||||
def decodeWalletImportFormat(WIFstring): # pylint: disable=inconsistent-return-statements
|
||||
"""Convert private key from base58 that's used in the config file to 8-bit binary string"""
|
||||
def decodeWalletImportFormat(WIFstring):
|
||||
# pylint: disable=inconsistent-return-statements
|
||||
"""
|
||||
Convert private key from base58 that's used in the config file to
|
||||
8-bit binary string
|
||||
"""
|
||||
fullString = arithmetic.changebase(WIFstring, 58, 256)
|
||||
privkey = fullString[:-4]
|
||||
if fullString[-4:] != \
|
||||
|
@ -126,14 +132,15 @@ def decodeWalletImportFormat(WIFstring): # pylint: disable=inconsistent-retur
|
|||
|
||||
|
||||
def reloadMyAddressHashes():
|
||||
"""Reinitialise runtime data (e.g. encryption objects, address hashes) from the config file"""
|
||||
"""Reload keys for user's addresses from the config file"""
|
||||
logger.debug('reloading keys from keys.dat file')
|
||||
myECCryptorObjects.clear()
|
||||
myAddressesByHash.clear()
|
||||
myAddressesByTag.clear()
|
||||
# myPrivateKeys.clear()
|
||||
|
||||
keyfileSecure = checkSensitiveFilePermissions(state.appdata + 'keys.dat')
|
||||
keyfileSecure = checkSensitiveFilePermissions(os.path.join(
|
||||
state.appdata, 'keys.dat'))
|
||||
hasEnabledKeys = False
|
||||
for addressInKeysFile in BMConfigParser().addresses():
|
||||
isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled')
|
||||
|
@ -162,11 +169,15 @@ def reloadMyAddressHashes():
|
|||
)
|
||||
|
||||
if not keyfileSecure:
|
||||
fixSensitiveFilePermissions(state.appdata + 'keys.dat', hasEnabledKeys)
|
||||
fixSensitiveFilePermissions(os.path.join(
|
||||
state.appdata, 'keys.dat'), hasEnabledKeys)
|
||||
|
||||
|
||||
def reloadBroadcastSendersForWhichImWatching():
|
||||
"""Reinitialise runtime data for the broadcasts I'm subscribed to from the config file"""
|
||||
"""
|
||||
Reinitialize runtime data for the broadcasts I'm subscribed to
|
||||
from the config file
|
||||
"""
|
||||
broadcastSendersForWhichImWatching.clear()
|
||||
MyECSubscriptionCryptorObjects.clear()
|
||||
queryreturn = sqlQuery('SELECT address FROM subscriptions where enabled=1')
|
||||
|
|
|
@ -16,8 +16,8 @@ appdata = ''
|
|||
|
||||
shutdown = 0
|
||||
"""
|
||||
Set to 1 by the doCleanShutdown function.
|
||||
Used to tell the proof of work worker threads to exit.
|
||||
Set to 1 by the `.shutdown.doCleanShutdown` function.
|
||||
Used to tell the threads to exit.
|
||||
"""
|
||||
|
||||
# Component control flags - set on startup, do not change during runtime
|
||||
|
@ -25,7 +25,7 @@ shutdown = 0
|
|||
enableNetwork = True
|
||||
"""enable network threads"""
|
||||
enableObjProc = True
|
||||
"""enable object processing threads"""
|
||||
"""enable object processing thread"""
|
||||
enableAPI = True
|
||||
"""enable API (if configured)"""
|
||||
enableGUI = True
|
||||
|
@ -35,7 +35,7 @@ enableSTDIO = False
|
|||
curses = False
|
||||
|
||||
sqlReady = False
|
||||
"""set to true by sqlTread when ready for processing"""
|
||||
"""set to true by `.threads.sqlThread` when ready for processing"""
|
||||
|
||||
maximumNumberOfHalfOpenConnections = 0
|
||||
|
||||
|
|
Reference in New Issue
Block a user