fixed onboarding bugs and enabled it by default
This commit is contained in:
parent
6500229000
commit
246ba6eb7b
7 changed files with 64 additions and 56 deletions
|
@ -38,22 +38,26 @@ def set_config_from_onboarding(config_settings: OnboardingConfig):
|
|||
|
||||
get = _get_val_or_none
|
||||
|
||||
config.reload()
|
||||
|
||||
if get(config_settings, 'stateTarget') or not get(config_settings,
|
||||
'networkContribution'):
|
||||
'networkContrib'):
|
||||
config.set('general.security_level', 1)
|
||||
|
||||
config.set('ui.theme', 'light')
|
||||
if get(config_settings, 'useDark'):
|
||||
config.set('ui.theme', 'dark')
|
||||
|
||||
if not get(config_settings,
|
||||
'useCircles') or config.get('general.security_level') > 0:
|
||||
config.set('plugins.disabled',
|
||||
config.get('plugins.disabled', []).append('flow'))
|
||||
disabled = config.get('plugins.disabled', [])
|
||||
|
||||
if not get(config_settings, 'useMail'):
|
||||
config.set('plugins.disabled',
|
||||
config.get('plugins.disabled', []).append('pms'))
|
||||
if not get(config_settings, 'circles') or \
|
||||
config.get('general.security_level') > 0:
|
||||
disabled.append('flow')
|
||||
|
||||
if not get(config_settings, 'mail'):
|
||||
disabled.append('pms')
|
||||
|
||||
config.set('plugins.disabled', disabled)
|
||||
|
||||
config.set('general.store_plaintext_blocks',
|
||||
get(config_settings, 'plainContrib'))
|
||||
|
|
|
@ -53,7 +53,7 @@ MAX_NEW_PEER_QUEUE = 1000
|
|||
"""Make announce take a few seconds (on average) to compute to discourage excessive node announcements"""
|
||||
ANNOUNCE_POW = 6
|
||||
"""30 days is plenty of time for someone to decide to renew a block"""
|
||||
DEFAULT_EXPIRE = 300
|
||||
DEFAULT_EXPIRE = 2592000
|
||||
# Metadata header section length limits, in bytes
|
||||
BLOCK_METADATA_LENGTHS = {'meta': 1000, 'sig': 200, 'signer': 200, 'time': 10, 'pow': 1000, 'encryptType': 4, 'expire': 14}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue