electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 118052d81597eff3eb636d242eacdd0437dabdd6
parent 56b3c9833267e888c205cd3f67e95c59e150ff68
Author: ThomasV <thomasv@gitorious>
Date:   Sat, 27 Jun 2015 15:22:34 +0200

v2.4 will require protocol v0.10

Diffstat:
Mlib/network.py | 2+-
Mlib/util.py | 3+++
Mlib/version.py | 4++--
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/network.py b/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 diff --git a/lib/util.py b/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): diff --git a/lib/version.py b/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