add blockchain_name and lbryum_servers to the adjustable settings

This commit is contained in:
Jack Robison 2018-01-04 21:30:41 -05:00
parent 92356840ae
commit b046a6578b
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF
3 changed files with 14 additions and 1 deletions

View file

@ -45,6 +45,7 @@ at anytime.
* Added an option to disable max key fee check.
* Add `wallet_unlock`, a command available during startup to unlock an encrypted wallet
* Add `--conf` CLI flag to specify an alternate config file
* Added `blockchain_name` and `lbryum_servers` to the adjustable settings
### Changed
* claim_show API command no longer takes name as argument

View file

@ -286,6 +286,8 @@ ADJUSTABLE_SETTINGS = {
'use_upnp': (bool, True),
'use_keyring': (bool, False),
'wallet': (str, LBRYUM_WALLET),
'blockchain_name': (str, 'lbrycrd_main'),
'lbryum_servers': (list, ['lbryum8.lbry.io:50001', 'lbryum9.lbry.io:50001'])
}

View file

@ -540,8 +540,18 @@ class Daemon(AuthJSONRPCServer):
if self.wallet_type == LBRYCRD_WALLET:
raise ValueError('LBRYcrd Wallet is no longer supported')
elif self.wallet_type == LBRYUM_WALLET:
log.info("Using lbryum wallet")
config = {'auto_connect': True}
lbryum_servers = {address.split(":")[0]: {'t': str(address.split(":")[1])}
for address in conf.settings['lbryum_servers']}
config = {
'auto_connect': True,
'chain': conf.settings['blockchain_name'],
'default_servers': lbryum_servers
}
if 'use_keyring' in conf.settings:
config['use_keyring'] = conf.settings['use_keyring']
if conf.settings['lbryum_wallet_dir']: