mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
rm redundant function from util
This commit is contained in:
parent
69a204d726
commit
40ceabff79
2 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue