follow-up prev
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user