SomberNight
7 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
1 additions and
4 deletions
-
electrum/network.py
-
electrum/util.py
|
|
@ -83,7 +83,7 @@ def parse_servers(result): |
|
|
|
def filter_version(servers): |
|
|
|
def is_recent(version): |
|
|
|
try: |
|
|
|
return util.normalize_version(version) >= util.normalize_version(PROTOCOL_VERSION) |
|
|
|
return util.versiontuple(version) >= util.versiontuple(PROTOCOL_VERSION) |
|
|
|
except Exception as e: |
|
|
|
return False |
|
|
|
return {k: v for k, v in servers.items() if is_recent(v.get('version'))} |
|
|
|
|
|
@ -71,9 +71,6 @@ def base_unit_name_to_decimal_point(unit_name: str) -> int: |
|
|
|
raise UnknownBaseUnit(unit_name) from None |
|
|
|
|
|
|
|
|
|
|
|
def normalize_version(v): |
|
|
|
return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] |
|
|
|
|
|
|
|
class NotEnoughFunds(Exception): pass |
|
|
|
|
|
|
|
|
|
|
|