tscripts: use config in get_peers - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit ff5074207c84ff34540a282a9b150a8f6dcc3f3c (DIR) parent 29aaa1c4c4543519a26c625ddd336f2f6364989a (HTM) Author: ThomasV <thomasv@electrum.org> Date: Wed, 6 Sep 2017 17:35:41 +0200 scripts: use config in get_peers Diffstat: M scripts/peers | 1 - M scripts/servers | 4 ++-- M scripts/util.py | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) --- (DIR) diff --git a/scripts/peers b/scripts/peers t@@ -33,7 +33,6 @@ def analyze(results): peers = util.get_peers() results = util.send_request(peers, 'blockchain.headers.subscribe', []) - errors = analyze(results).keys() for n,v in sorted(results.items(), key=lambda x:x[1].get('block_height')): (DIR) diff --git a/scripts/servers b/scripts/servers t@@ -1,13 +1,13 @@ #!/usr/bin/env python3 -from electrum import SimpleConfig, set_verbosity +from electrum import set_verbosity from electrum.network import filter_protocol from collections import defaultdict import util, json set_verbosity(False) -config = SimpleConfig() + servers = util.get_peers() results = util.send_request(servers, 'blockchain.headers.subscribe', []) (DIR) diff --git a/scripts/util.py b/scripts/util.py t@@ -45,9 +45,10 @@ def wait_on_interfaces(interfaces, timeout=10): return result def get_peers(): + config = SimpleConfig() peers = [] # 1. get connected interfaces - server = 'h.1209k.com:50002:s' + server = config.get('server') interfaces = get_interfaces([server]) if not interfaces: print("No connection to", server)