mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
follow-up prev
This commit is contained in:
parent
e37da62a1c
commit
1a5c77aa82
2 changed files with 5 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue