separation between wallet storage and config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from version import ELECTRUM_VERSION
|
||||
from util import format_satoshis, print_msg, print_json, print_error, set_verbosity
|
||||
from wallet import WalletSynchronizer
|
||||
from wallet import WalletSynchronizer, WalletStorage
|
||||
from wallet_factory import WalletFactory as Wallet
|
||||
from verifier import WalletVerifier
|
||||
from interface import Interface, pick_random_server, DEFAULT_SERVERS
|
||||
|
||||
@@ -392,7 +392,7 @@ class Interface(threading.Thread):
|
||||
self.unanswered_requests[self.message_id] = method, params, channel
|
||||
ids.append(self.message_id)
|
||||
# uncomment to debug
|
||||
# print "-->",request
|
||||
# print "-->", request
|
||||
self.message_id += 1
|
||||
out += request + '\n'
|
||||
while out:
|
||||
|
||||
@@ -6,6 +6,9 @@ from version import ELECTRUM_VERSION, SEED_VERSION
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class SimpleConfig:
|
||||
"""
|
||||
The SimpleConfig class is responsible for handling operations involving
|
||||
@@ -29,46 +32,44 @@ a SimpleConfig instance then reads the wallet file.
|
||||
# command-line options
|
||||
self.options_config = options
|
||||
|
||||
self.wallet_config = {}
|
||||
self.wallet_file_exists = False
|
||||
self.init_path(self.options_config.get('wallet_path'))
|
||||
print_error( "path", self.path )
|
||||
if self.path:
|
||||
self.read_wallet_config(self.path)
|
||||
# init path
|
||||
self.init_path(options)
|
||||
|
||||
print "user dir", self.user_dir
|
||||
|
||||
|
||||
def init_path(self, options):
|
||||
|
||||
# Look for wallet file in the default data directory.
|
||||
# Make wallet directory if it does not yet exist.
|
||||
if not os.path.exists(self.user_dir):
|
||||
os.mkdir(self.user_dir)
|
||||
|
||||
|
||||
# portable wallet: use the same directory for wallet and headers file
|
||||
if options.get('portable'):
|
||||
self.wallet_config['blockchain_headers_path'] = os.path.dirname(self.path)
|
||||
#if options.get('portable'):
|
||||
# self.wallet_config['blockchain_headers_path'] = os.path.dirname(self.path)
|
||||
|
||||
|
||||
|
||||
|
||||
def set_key(self, key, value, save = False):
|
||||
def set_key(self, key, value, save = True):
|
||||
# find where a setting comes from and save it there
|
||||
if self.options_config.get(key) is not None:
|
||||
print "Warning: not changing '%s' because it was passed as a command-line option"%key
|
||||
return
|
||||
|
||||
elif self.user_config.get(key) is not None:
|
||||
self.user_config[key] = value
|
||||
if save: self.save_user_config()
|
||||
|
||||
elif self.system_config.get(key) is not None:
|
||||
if str(self.system_config[key]) != str(value):
|
||||
print "Warning: not changing '%s' because it was set in the system configuration"%key
|
||||
|
||||
elif self.wallet_config.get(key) is not None:
|
||||
self.wallet_config[key] = value
|
||||
if save: self.save_wallet_config()
|
||||
|
||||
else:
|
||||
# add key to wallet config
|
||||
self.wallet_config[key] = value
|
||||
if save: self.save_wallet_config()
|
||||
self.user_config[key] = value
|
||||
if save: self.save_user_config()
|
||||
|
||||
|
||||
|
||||
def get(self, key, default=None):
|
||||
"""Retrieve the filepath of the configuration file specified in the 'key' parameter."""
|
||||
|
||||
out = None
|
||||
|
||||
# 1. command-line options always override everything
|
||||
if self.options_config.has_key(key) and self.options_config.get(key) is not None:
|
||||
out = self.options_config.get(key)
|
||||
@@ -81,10 +82,6 @@ a SimpleConfig instance then reads the wallet file.
|
||||
elif self.system_config.has_key(key):
|
||||
out = self.system_config.get(key)
|
||||
|
||||
# 3. use the wallet file config
|
||||
else:
|
||||
out = self.wallet_config.get(key)
|
||||
|
||||
if out is None and default is not None:
|
||||
out = default
|
||||
|
||||
@@ -135,85 +132,29 @@ a SimpleConfig instance then reads the wallet file.
|
||||
"""Parse and store the user config settings in electrum.conf into user_config[]."""
|
||||
if not self.user_dir: return
|
||||
|
||||
name = os.path.join( self.user_dir, 'electrum.conf')
|
||||
if os.path.exists(name):
|
||||
path = os.path.join(self.user_dir, "config")
|
||||
if os.path.exists(path):
|
||||
try:
|
||||
import ConfigParser
|
||||
except ImportError:
|
||||
print "cannot parse electrum.conf. please install ConfigParser"
|
||||
with open(path, "r") as f:
|
||||
data = f.read()
|
||||
except IOError:
|
||||
return
|
||||
|
||||
p = ConfigParser.ConfigParser()
|
||||
p.read(name)
|
||||
try:
|
||||
for k, v in p.items('client'):
|
||||
self.user_config[k] = v
|
||||
except ConfigParser.NoSectionError:
|
||||
pass
|
||||
d = ast.literal_eval( data ) #parse raw data from reading wallet file
|
||||
except:
|
||||
raise IOError("Cannot read config file.")
|
||||
|
||||
def init_path(self, path):
|
||||
"""Set the path of the wallet."""
|
||||
|
||||
if not path:
|
||||
path = self.get('default_wallet_path')
|
||||
|
||||
if path is not None:
|
||||
self.path = path
|
||||
return
|
||||
|
||||
# Look for wallet file in the default data directory.
|
||||
# Make wallet directory if it does not yet exist.
|
||||
if not os.path.exists(self.user_dir):
|
||||
os.mkdir(self.user_dir)
|
||||
self.path = os.path.join(self.user_dir, "electrum.dat")
|
||||
self.user_config = d
|
||||
|
||||
|
||||
def save_user_config(self):
|
||||
if not self.user_dir: return
|
||||
|
||||
import ConfigParser
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.add_section('client')
|
||||
for k,v in self.user_config.items():
|
||||
config.set('client', k, v)
|
||||
|
||||
with open( os.path.join( self.user_dir, 'electrum.conf'), 'wb') as configfile:
|
||||
config.write(configfile)
|
||||
|
||||
|
||||
|
||||
|
||||
def read_wallet_config(self, path):
|
||||
"""Read the contents of the wallet file."""
|
||||
try:
|
||||
with open(self.path, "r") as f:
|
||||
data = f.read()
|
||||
except IOError:
|
||||
return
|
||||
try:
|
||||
d = ast.literal_eval( data ) #parse raw data from reading wallet file
|
||||
except:
|
||||
raise IOError("Cannot read wallet file.")
|
||||
|
||||
self.wallet_config = d
|
||||
self.wallet_file_exists = True
|
||||
|
||||
|
||||
|
||||
def save(self, key=None):
|
||||
self.save_wallet_config()
|
||||
|
||||
|
||||
def save_wallet_config(self):
|
||||
# prevent the creation of incomplete wallets
|
||||
#if self.wallet_config.get('master_public_keys') is None:
|
||||
# return
|
||||
|
||||
s = repr(self.wallet_config)
|
||||
f = open(self.path,"w")
|
||||
path = os.path.join(self.user_dir, "config")
|
||||
s = repr(self.user_config)
|
||||
f = open(path,"w")
|
||||
f.write( s )
|
||||
f.close()
|
||||
if self.get('gui') != 'android':
|
||||
import stat
|
||||
os.chmod(self.path,stat.S_IREAD | stat.S_IWRITE)
|
||||
|
||||
os.chmod(path, stat.S_IREAD | stat.S_IWRITE)
|
||||
|
||||
204
lib/wallet.py
204
lib/wallet.py
@@ -63,43 +63,112 @@ def pw_decode(s, password):
|
||||
from version import ELECTRUM_VERSION, SEED_VERSION
|
||||
|
||||
|
||||
class Wallet:
|
||||
def __init__(self, config={}):
|
||||
class WalletStorage:
|
||||
|
||||
self.config = config
|
||||
def __init__(self, config):
|
||||
self.data = {}
|
||||
self.file_exists = False
|
||||
self.init_path(config)
|
||||
print_error( "wallet path", self.path )
|
||||
if self.path:
|
||||
self.read(self.path)
|
||||
|
||||
|
||||
def init_path(self, config):
|
||||
"""Set the path of the wallet."""
|
||||
|
||||
path = config.get('wallet_path')
|
||||
if not path:
|
||||
path = config.get('default_wallet_path')
|
||||
if path is not None:
|
||||
self.path = path
|
||||
return
|
||||
|
||||
# Look for wallet file in the default data directory.
|
||||
# Make wallet directory if it does not yet exist.
|
||||
if not os.path.exists(self.user_dir):
|
||||
os.mkdir(self.user_dir)
|
||||
|
||||
self.path = os.path.join(self.user_dir, "electrum.dat")
|
||||
|
||||
|
||||
def read(self, path):
|
||||
"""Read the contents of the wallet file."""
|
||||
try:
|
||||
with open(self.path, "r") as f:
|
||||
data = f.read()
|
||||
except IOError:
|
||||
return
|
||||
try:
|
||||
d = ast.literal_eval( data ) #parse raw data from reading wallet file
|
||||
except:
|
||||
raise IOError("Cannot read wallet file.")
|
||||
|
||||
self.data = d
|
||||
self.file_exists = True
|
||||
|
||||
|
||||
def get(self, key, default=None):
|
||||
return self.data.get(key, default)
|
||||
|
||||
def put(self, key, value, save = True):
|
||||
|
||||
if self.data.get(key) is not None:
|
||||
self.data[key] = value
|
||||
else:
|
||||
# add key to wallet config
|
||||
self.data[key] = value
|
||||
|
||||
if save:
|
||||
self.write()
|
||||
|
||||
|
||||
def write(self):
|
||||
s = repr(self.data)
|
||||
f = open(self.path,"w")
|
||||
f.write( s )
|
||||
f.close()
|
||||
if self.get('gui') != 'android':
|
||||
import stat
|
||||
os.chmod(self.path,stat.S_IREAD | stat.S_IWRITE)
|
||||
|
||||
|
||||
class Wallet:
|
||||
|
||||
def __init__(self, storage):
|
||||
|
||||
self.storage = storage
|
||||
self.electrum_version = ELECTRUM_VERSION
|
||||
self.gap_limit_for_change = 3 # constant
|
||||
|
||||
# saved fields
|
||||
self.seed_version = config.get('seed_version', SEED_VERSION)
|
||||
self.seed_version = storage.get('seed_version', SEED_VERSION)
|
||||
|
||||
self.gap_limit = config.get('gap_limit', 5)
|
||||
self.use_change = config.get('use_change',True)
|
||||
self.fee = int(config.get('fee_per_kb',20000))
|
||||
self.num_zeros = int(config.get('num_zeros',0))
|
||||
self.use_encryption = config.get('use_encryption', False)
|
||||
self.seed = config.get('seed', '') # encrypted
|
||||
self.labels = config.get('labels', {})
|
||||
self.frozen_addresses = config.get('frozen_addresses',[])
|
||||
self.prioritized_addresses = config.get('prioritized_addresses',[])
|
||||
self.addressbook = config.get('contacts', [])
|
||||
self.gap_limit = storage.get('gap_limit', 5)
|
||||
self.use_change = storage.get('use_change',True)
|
||||
self.use_encryption = storage.get('use_encryption', False)
|
||||
self.seed = storage.get('seed', '') # encrypted
|
||||
self.labels = storage.get('labels', {})
|
||||
self.frozen_addresses = storage.get('frozen_addresses',[])
|
||||
self.prioritized_addresses = storage.get('prioritized_addresses',[])
|
||||
self.addressbook = storage.get('contacts', [])
|
||||
|
||||
self.imported_keys = config.get('imported_keys',{})
|
||||
self.history = config.get('addr_history',{}) # address -> list(txid, height)
|
||||
self.imported_keys = storage.get('imported_keys',{})
|
||||
self.history = storage.get('addr_history',{}) # address -> list(txid, height)
|
||||
|
||||
|
||||
self.master_public_keys = config.get('master_public_keys',{})
|
||||
self.master_private_keys = config.get('master_private_keys', {})
|
||||
self.master_public_keys = storage.get('master_public_keys',{})
|
||||
self.master_private_keys = storage.get('master_private_keys', {})
|
||||
|
||||
self.first_addresses = config.get('first_addresses',{})
|
||||
self.first_addresses = storage.get('first_addresses',{})
|
||||
|
||||
#if self.seed_version != SEED_VERSION:
|
||||
# raise ValueError("This wallet seed is deprecated. Please restore from seed.")
|
||||
|
||||
self.load_accounts(config)
|
||||
self.load_accounts()
|
||||
|
||||
self.transactions = {}
|
||||
tx = config.get('transactions',{})
|
||||
tx = storage.get('transactions',{})
|
||||
try:
|
||||
for k,v in tx.items(): self.transactions[k] = Transaction(v)
|
||||
except:
|
||||
@@ -153,13 +222,13 @@ class Wallet:
|
||||
|
||||
# store the originally requested keypair into the imported keys table
|
||||
self.imported_keys[address] = pw_encode(sec, password )
|
||||
self.config.set_key('imported_keys', self.imported_keys, True)
|
||||
self.storage.put('imported_keys', self.imported_keys, True)
|
||||
return address
|
||||
|
||||
def delete_imported_key(self, addr):
|
||||
if addr in self.imported_keys:
|
||||
self.imported_keys.pop(addr)
|
||||
self.config.set_key('imported_keys', self.imported_keys, True)
|
||||
self.storage.put('imported_keys', self.imported_keys, True)
|
||||
|
||||
|
||||
def init_seed(self, seed):
|
||||
@@ -170,8 +239,8 @@ class Wallet:
|
||||
|
||||
|
||||
def save_seed(self):
|
||||
self.config.set_key('seed', self.seed, True)
|
||||
self.config.set_key('seed_version', self.seed_version, True)
|
||||
self.storage.put('seed', self.seed, True)
|
||||
self.storage.put('seed_version', self.seed_version, True)
|
||||
|
||||
master_k, master_c, master_K, master_cK = bip32_init(self.seed)
|
||||
|
||||
@@ -203,8 +272,8 @@ class Wallet:
|
||||
"m/5'/": k5
|
||||
}
|
||||
|
||||
self.config.set_key('master_public_keys', self.master_public_keys, True)
|
||||
self.config.set_key('master_private_keys', self.master_private_keys, True)
|
||||
self.storage.put('master_public_keys', self.master_public_keys, True)
|
||||
self.storage.put('master_private_keys', self.master_private_keys, True)
|
||||
|
||||
# create default account
|
||||
self.create_account('1','Main account')
|
||||
@@ -221,14 +290,14 @@ class Wallet:
|
||||
# for safety, we ask the user to enter their seed
|
||||
assert seed == self.decode_seed(password)
|
||||
self.seed = ''
|
||||
self.config.set_key('seed', '', True)
|
||||
self.storage.put('seed', '', True)
|
||||
|
||||
|
||||
def deseed_branch(self, k):
|
||||
# check that parent has no seed
|
||||
assert self.seed == ''
|
||||
self.master_private_keys.pop(k)
|
||||
self.config.set_key('master_private_keys', self.master_private_keys, True)
|
||||
self.storage.put('master_private_keys', self.master_private_keys, True)
|
||||
|
||||
|
||||
def account_id(self, account_type, i):
|
||||
@@ -261,7 +330,7 @@ class Wallet:
|
||||
account_id, account = self.next_account(account_type)
|
||||
addr = account.first_address()
|
||||
self.first_addresses[k] = addr
|
||||
self.config.set_key('first_addresses',self.first_addresses)
|
||||
self.storage.put('first_addresses',self.first_addresses)
|
||||
|
||||
return addr
|
||||
|
||||
@@ -301,13 +370,13 @@ class Wallet:
|
||||
self.save_accounts()
|
||||
if name:
|
||||
self.labels[account_id] = name
|
||||
self.config.set_key('labels', self.labels, True)
|
||||
self.storage.put('labels', self.labels, True)
|
||||
|
||||
|
||||
def create_old_account(self):
|
||||
print self.seed
|
||||
mpk = OldAccount.mpk_from_seed(self.seed)
|
||||
self.config.set_key('master_public_key', mpk, True)
|
||||
self.storage.put('master_public_key', mpk, True)
|
||||
self.accounts[0] = OldAccount({'mpk':mpk, 0:[], 1:[]})
|
||||
self.save_accounts()
|
||||
|
||||
@@ -316,16 +385,16 @@ class Wallet:
|
||||
d = {}
|
||||
for k, v in self.accounts.items():
|
||||
d[k] = v.dump()
|
||||
self.config.set_key('accounts', d, True)
|
||||
self.storage.put('accounts', d, True)
|
||||
|
||||
|
||||
|
||||
def load_accounts(self, config):
|
||||
d = config.get('accounts', {})
|
||||
def load_accounts(self):
|
||||
d = self.storage.get('accounts', {})
|
||||
self.accounts = {}
|
||||
for k, v in d.items():
|
||||
if k == 0:
|
||||
v['mpk'] = config.get('master_public_key')
|
||||
v['mpk'] = self.storage.get('master_public_key')
|
||||
self.accounts[k] = OldAccount(v)
|
||||
elif '&' in k:
|
||||
self.accounts[k] = BIP32_Account_2of2(v)
|
||||
@@ -353,7 +422,7 @@ class Wallet:
|
||||
|
||||
def get_master_public_key(self):
|
||||
raise
|
||||
return self.config.get("master_public_key")
|
||||
return self.storage.get("master_public_key")
|
||||
|
||||
def get_master_private_key(self, account, password):
|
||||
master_k = pw_decode( self.master_private_keys[account], password)
|
||||
@@ -534,7 +603,7 @@ class Wallet:
|
||||
def change_gap_limit(self, value):
|
||||
if value >= self.gap_limit:
|
||||
self.gap_limit = value
|
||||
self.config.set_key('gap_limit', self.gap_limit, True)
|
||||
self.storage.put('gap_limit', self.gap_limit, True)
|
||||
self.interface.poke('synchronizer')
|
||||
return True
|
||||
|
||||
@@ -547,7 +616,7 @@ class Wallet:
|
||||
self.accounts[key][0] = addresses
|
||||
|
||||
self.gap_limit = value
|
||||
self.config.set_key('gap_limit', self.gap_limit, True)
|
||||
self.storage.put('gap_limit', self.gap_limit, True)
|
||||
self.save_accounts()
|
||||
return True
|
||||
else:
|
||||
@@ -637,7 +706,7 @@ class Wallet:
|
||||
new += self.synchronize_account(account)
|
||||
if new:
|
||||
self.save_accounts()
|
||||
self.config.set_key('addr_history', self.history, True)
|
||||
self.storage.put('addr_history', self.history, True)
|
||||
return new
|
||||
|
||||
|
||||
@@ -647,15 +716,15 @@ class Wallet:
|
||||
|
||||
def add_contact(self, address, label=None):
|
||||
self.addressbook.append(address)
|
||||
self.config.set_key('contacts', self.addressbook, True)
|
||||
self.storage.put('contacts', self.addressbook, True)
|
||||
if label:
|
||||
self.labels[address] = label
|
||||
self.config.set_key('labels', self.labels, True)
|
||||
self.storage.put('labels', self.labels, True)
|
||||
|
||||
def delete_contact(self, addr):
|
||||
if addr in self.addressbook:
|
||||
self.addressbook.remove(addr)
|
||||
self.config.set_key('addressbook', self.addressbook, True)
|
||||
self.storage.put('addressbook', self.addressbook, True)
|
||||
|
||||
|
||||
def fill_addressbook(self):
|
||||
@@ -915,7 +984,7 @@ class Wallet:
|
||||
tx = {}
|
||||
for k,v in self.transactions.items():
|
||||
tx[k] = str(v)
|
||||
self.config.set_key('transactions', tx, True)
|
||||
self.storage.put('transactions', tx, True)
|
||||
|
||||
def receive_history_callback(self, addr, hist):
|
||||
|
||||
@@ -924,7 +993,7 @@ class Wallet:
|
||||
|
||||
with self.lock:
|
||||
self.history[addr] = hist
|
||||
self.config.set_key('addr_history', self.history, True)
|
||||
self.storage.put('addr_history', self.history, True)
|
||||
|
||||
if hist != ['*']:
|
||||
for tx_hash, tx_height in hist:
|
||||
@@ -1075,28 +1144,28 @@ class Wallet:
|
||||
if new_password == '': new_password = None
|
||||
# this will throw an exception if unicode cannot be converted
|
||||
self.seed = pw_encode( seed, new_password)
|
||||
self.config.set_key('seed', self.seed, True)
|
||||
self.storage.put('seed', self.seed, True)
|
||||
self.use_encryption = (new_password != None)
|
||||
self.config.set_key('use_encryption', self.use_encryption,True)
|
||||
self.storage.put('use_encryption', self.use_encryption,True)
|
||||
for k in self.imported_keys.keys():
|
||||
a = self.imported_keys[k]
|
||||
b = pw_decode(a, old_password)
|
||||
c = pw_encode(b, new_password)
|
||||
self.imported_keys[k] = c
|
||||
self.config.set_key('imported_keys', self.imported_keys, True)
|
||||
self.storage.put('imported_keys', self.imported_keys, True)
|
||||
|
||||
for k, v in self.master_private_keys.items():
|
||||
b = pw_decode(v, old_password)
|
||||
c = pw_encode(b, new_password)
|
||||
self.master_private_keys[k] = c
|
||||
self.config.set_key('master_private_keys', self.master_private_keys, True)
|
||||
self.storage.put('master_private_keys', self.master_private_keys, True)
|
||||
|
||||
|
||||
def freeze(self,addr):
|
||||
if self.is_mine(addr) and addr not in self.frozen_addresses:
|
||||
self.unprioritize(addr)
|
||||
self.frozen_addresses.append(addr)
|
||||
self.config.set_key('frozen_addresses', self.frozen_addresses, True)
|
||||
self.storage.put('frozen_addresses', self.frozen_addresses, True)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@@ -1104,7 +1173,7 @@ class Wallet:
|
||||
def unfreeze(self,addr):
|
||||
if self.is_mine(addr) and addr in self.frozen_addresses:
|
||||
self.frozen_addresses.remove(addr)
|
||||
self.config.set_key('frozen_addresses', self.frozen_addresses, True)
|
||||
self.storage.put('frozen_addresses', self.frozen_addresses, True)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@@ -1113,7 +1182,7 @@ class Wallet:
|
||||
if self.is_mine(addr) and addr not in self.prioritized_addresses:
|
||||
self.unfreeze(addr)
|
||||
self.prioritized_addresses.append(addr)
|
||||
self.config.set_key('prioritized_addresses', self.prioritized_addresses, True)
|
||||
self.storage.put('prioritized_addresses', self.prioritized_addresses, True)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@@ -1121,38 +1190,11 @@ class Wallet:
|
||||
def unprioritize(self,addr):
|
||||
if self.is_mine(addr) and addr in self.prioritized_addresses:
|
||||
self.prioritized_addresses.remove(addr)
|
||||
self.config.set_key('prioritized_addresses', self.prioritized_addresses, True)
|
||||
self.storage.put('prioritized_addresses', self.prioritized_addresses, True)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_fee(self, fee):
|
||||
if self.fee != fee:
|
||||
self.fee = fee
|
||||
self.config.set_key('fee_per_kb', self.fee, True)
|
||||
|
||||
|
||||
def save(self):
|
||||
print_error("Warning: wallet.save() is deprecated")
|
||||
tx = {}
|
||||
for k,v in self.transactions.items():
|
||||
tx[k] = str(v)
|
||||
|
||||
s = {
|
||||
'use_change': self.use_change,
|
||||
'fee_per_kb': self.fee,
|
||||
'addr_history': self.history,
|
||||
'labels': self.labels,
|
||||
'contacts': self.addressbook,
|
||||
'num_zeros': self.num_zeros,
|
||||
'frozen_addresses': self.frozen_addresses,
|
||||
'prioritized_addresses': self.prioritized_addresses,
|
||||
'gap_limit': self.gap_limit,
|
||||
'transactions': tx,
|
||||
}
|
||||
for k, v in s.items():
|
||||
self.config.set_key(k,v)
|
||||
self.config.save()
|
||||
|
||||
def set_verifier(self, verifier):
|
||||
self.verifier = verifier
|
||||
@@ -1259,7 +1301,7 @@ class Wallet:
|
||||
class WalletSynchronizer(threading.Thread):
|
||||
|
||||
|
||||
def __init__(self, wallet, config):
|
||||
def __init__(self, wallet):
|
||||
threading.Thread.__init__(self)
|
||||
self.daemon = True
|
||||
self.wallet = wallet
|
||||
|
||||
Reference in New Issue
Block a user