1
0

revert 175bfae9e6. store last known height in wallet instead

This commit is contained in:
ThomasV
2015-05-08 13:43:42 +02:00
parent 1d517abf39
commit 233fd8ed77
4 changed files with 27 additions and 30 deletions

View File

@@ -71,16 +71,12 @@ class SimpleConfig(object):
# update the current options with the command line options last (to
# override both others).
self.read_only_options.update(options)
# init path
self.init_path()
# user config.
self.user_config = read_user_config_function(self.path)
self.refresh_height()
set_config(self) # Make a singleton instance of 'self'
# Make a singleton instance of 'self'
set_config(self)
def init_path(self):
# Read electrum path in the command line configuration
@@ -106,7 +102,6 @@ class SimpleConfig(object):
self.user_config[key] = value
if save:
self.save_user_config()
return
def get(self, key, default=None):
@@ -124,16 +119,6 @@ class SimpleConfig(object):
return False
return True
def headers_filename(self):
return os.path.join(self.path, 'blockchain_headers')
def refresh_height(self):
name = self.headers_filename()
if os.path.exists(name):
self.height = os.path.getsize(name) / 80 - 1
else:
self.height = 0
def save_user_config(self):
if not self.path:
return