Browse Source

v2.4 will require protocol v0.10

283
ThomasV 10 years ago
parent
commit
118052d815
  1. 2
      lib/network.py
  2. 3
      lib/util.py
  3. 4
      lib/version.py

2
lib/network.py

@ -59,7 +59,7 @@ def parse_servers(result):
pruning_level = v[1:]
if pruning_level == '': pruning_level = '0'
try:
is_recent = float(version)>=float(PROTOCOL_VERSION)
is_recent = cmp(util.normalize_version(version), util.normalize_version(PROTOCOL_VERSION)) >= 0
except Exception:
is_recent = False

3
lib/util.py

@ -7,6 +7,9 @@ import urlparse
import urllib
import threading
def normalize_version(v):
return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")]
class NotEnoughFunds(Exception): pass
class InvalidPassword(Exception):

4
lib/version.py

@ -1,5 +1,5 @@
ELECTRUM_VERSION = "2.3.3" # version of the client package
PROTOCOL_VERSION = '0.9' # protocol version requested
ELECTRUM_VERSION = "2.4" # version of the client package
PROTOCOL_VERSION = '0.10' # protocol version requested
NEW_SEED_VERSION = 11 # electrum versions >= 2.0
OLD_SEED_VERSION = 4 # electrum versions < 2.0

Loading…
Cancel
Save