follow-up prev

This commit is contained in:
SomberNight 2018-11-02 20:37:37 +01:00
parent e37da62a1c
commit 1a5c77aa82
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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")