Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eukreign committed Jun 18, 2021
1 parent e64b497 commit 2c96c78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lbry/wallet/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ async def from_lbrynet_config(cls, config: Config):

ledger_config = {
'auto_connect': True,
'explicit_servers': [],
'default_servers': config.lbryum_servers,
'known_hubs': config.known_hubs,
'jurisdiction': config.jurisdiction,
Expand Down
2 changes: 1 addition & 1 deletion lbry/wallet/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ async def get_n_fastest_spvs(self, timeout=3.0) -> Dict[Tuple[str, int], Optiona
n = len(ip_to_hostnames)
log.info("%i possible spv servers to try (%i urls in config)", n, len(self.config['explicit_servers']))
pongs = {}
known_hubs = self.known_hubs
try:
await loop.create_datagram_endpoint(lambda: connection, ('0.0.0.0', 0))
# could raise OSError if it cant bind
start = perf_counter()
for server in ip_to_hostnames:
connection.ping(server)
sent_ping_timestamps[server] = perf_counter()
known_hubs = self.known_hubs
while len(pongs) < n:
(remote, ts), pong = await asyncio.wait_for(pong_responses.get(), timeout - (perf_counter() - start))
latency = ts - start
Expand Down

0 comments on commit 2c96c78

Please sign in to comment.