Browse Source

Hard fail on bad server-string (#6086)

* If server-string can't be parsed, fall back to localhost.

Co-Authored-By: Luke Childs <lukechilds123@gmail.com>

Co-authored-by: ghost43 <somber.night@protonmail.com>
patch-2
Luke Childs 5 years ago
committed by GitHub
parent
commit
1d667fe932
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      electrum/network.py

4
electrum/network.py

@ -268,8 +268,8 @@ class Network(Logger):
try:
deserialize_server(self.default_server)
except:
self.logger.warning('failed to parse server-string; falling back to random.')
self.default_server = None
self.logger.warning('failed to parse server-string; falling back to localhost.')
self.default_server = "localhost:50002:s"
if not self.default_server:
self.default_server = pick_random_server()

Loading…
Cancel
Save