commit 1a5c77aa82d0ddc1a2b47276ea94e17b2aa04e80
parent e37da62a1ce68ed2374ddc18796a89bd21529b70
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 2 Nov 2018 20:37:37 +0100
follow-up prev
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/electrum/scripts/servers.py b/electrum/scripts/servers.py
@@ -2,17 +2,19 @@
import json
import asyncio
+from electrum.simple_config import SimpleConfig
from electrum.network import filter_version, Network
from electrum.util import create_and_start_event_loop, log_exceptions
from electrum import constants
import util
-
+# testnet?
#constants.set_testnet()
+config = SimpleConfig({'testnet': False})
loop, stopping_fut, loop_thread = create_and_start_event_loop()
-network = Network()
+network = Network(config)
network.start()
@log_exceptions
diff --git a/electrum/scripts/util.py b/electrum/scripts/util.py
@@ -12,6 +12,7 @@ from electrum.interface import Interface
async def get_peers(network: Network):
while not network.is_connected():
await asyncio.sleep(1)
+ print("waiting for network to get connected...")
interface = network.interface
session = interface.session
print(f"asking server {interface.server} for its peers")