electrum

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

commit d69b9ca2ec142b181c01e49a7a133210dfde12d5
parent 008feaa768ab9f5439a444c6440581aa5a212e9e
Author: ThomasV <thomasv@gitorious>
Date:   Fri,  9 Dec 2011 21:01:53 +0300

version management

Diffstat:
Mclient/MANIFEST.in | 9++-------
Mclient/electrum.py | 18++++++++++--------
Mclient/gui.py | 2+-
Mclient/setup.py | 6++----
Aclient/version.py | 1+
5 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/client/MANIFEST.in b/client/MANIFEST.in @@ -1,6 +1,2 @@ -include client/README client/LICENCE -include server/README server/LICENCE -include server/electrum.php -recursive-include client *.py -recursive-include server *.py -recursive-include server/patches *- \ No newline at end of file +include README LICENCE RELEASE-NOTES +recursive-include *.py diff --git a/client/electrum.py b/client/electrum.py @@ -33,7 +33,6 @@ except: sys.exit(1) - ############ functions from pywallet ##################### addrtype = 0 @@ -216,17 +215,20 @@ class InvalidPassword(Exception): -WALLET_VERSION = 3 # bump this everytime the wallet format is modified +SEED_VERSION = 3 # bump this everytime the seed generation is modified +from version import ELECTRUM_VERSION class Wallet: def __init__(self, wallet_path): + self.electrum_version = ELECTRUM_VERSION + self.seed_version = SEED_VERSION + self.gap_limit = 5 # configuration self.host = 'ecdsa.org' self.port = 50000 self.fee = 50000 - self.version = WALLET_VERSION self.servers = ['ecdsa.org','electrum.novit.ro'] # list of default servers # saved fields @@ -362,7 +364,7 @@ class Wallet: return True def save(self): - s = repr( (self.version, self.use_encryption, self.fee, self.host, self.port, self.blocks, + s = repr( (self.seed_version, self.use_encryption, self.fee, self.host, self.port, self.blocks, self.seed, self.addresses, self.private_keys, self.change_addresses, self.status, self.history, self.labels, self.addressbook) ) @@ -379,7 +381,7 @@ class Wallet: return False try: sequence = ast.literal_eval( data ) - (self.version, self.use_encryption, self.fee, self.host, self.port, self.blocks, + (self.seed_version, self.use_encryption, self.fee, self.host, self.port, self.blocks, self.seed, self.addresses, self.private_keys, self.change_addresses, self.status, self.history, self.labels, self.addressbook) = sequence @@ -388,8 +390,8 @@ class Wallet: # it is safer to exit immediately print "Error; could not parse wallet." exit(1) - if self.version != WALLET_VERSION: - raise BaseException("Wallet version error.\nPlease move your balance to a new wallet.\nSee the release notes for more information.") + if self.seed_version != SEED_VERSION: + raise BaseException("Seed version mismatch.\nPlease move your balance to a new wallet.\nSee the release notes for more information.") self.update_tx_history() return True @@ -471,7 +473,7 @@ class Wallet: return ast.literal_eval( self.request( repr ( ('poll', self.session_id )))) def new_session(self): - self.session_id, self.message = ast.literal_eval( self.request( repr ( ('session', repr(self.addresses) )))) + self.session_id, self.message = ast.literal_eval( self.request( repr ( ('session', repr(self.addresses)) ))) def update_session(self): return self.request( repr ( ('update_session', repr((self.session_id,self.addresses))))) diff --git a/client/gui.py b/client/gui.py @@ -402,7 +402,7 @@ class BitcoinGUI: self.period = 5 self.window = MyWindow(gtk.WINDOW_TOPLEVEL) - self.window.set_title(APP_NAME) + self.window.set_title(APP_NAME + " " + self.wallet.electrum_version) self.window.connect("destroy", gtk.main_quit) self.window.set_border_width(0) self.window.connect('mykeypress', gtk.main_quit) diff --git a/client/setup.py b/client/setup.py @@ -2,13 +2,11 @@ # python setup.py sdist --format=zip,gztar - from distutils.core import setup - -version = "0.32" +from version import ELECTRUM_VERSION setup(name = "Electrum", - version = version, + version = ELECTRUM_VERSION, description = "Lightweight Bitcoin Wallet", author = "thomasv", license = "GNU GPLv3", diff --git a/client/version.py b/client/version.py @@ -0,0 +1 @@ +ELECTRUM_VERSION = "0.33"