From b046a6578ba567298e4b38ae5f4fc840e169b90d Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 4 Jan 2018 21:30:41 -0500 Subject: [PATCH] add `blockchain_name` and `lbryum_servers` to the adjustable settings --- CHANGELOG.md | 1 + lbrynet/conf.py | 2 ++ lbrynet/daemon/Daemon.py | 12 +++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 715b4a591..8c76daa53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 29fb2b327..eee8cf0b3 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -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']) } diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index b628831a2..2f16dec31 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -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']: