|
|
@ -336,7 +336,8 @@ class Wallet: |
|
|
|
self.accounts[key][0] = addresses |
|
|
|
|
|
|
|
self.gap_limit = value |
|
|
|
self.save() |
|
|
|
self.config.set_key('gap_limit', self.gap_limit, True) |
|
|
|
self.config.set_key('accounts', self.accounts, True) |
|
|
|
return True |
|
|
|
else: |
|
|
|
return False |
|
|
@ -405,6 +406,9 @@ class Wallet: |
|
|
|
new = [] |
|
|
|
for account in self.accounts.keys(): |
|
|
|
new += self.synchronize_account(account) |
|
|
|
if new: |
|
|
|
self.config.set_key('accounts', self.accounts, True) |
|
|
|
self.config.set_key('addr_history', self.history, True) |
|
|
|
return new |
|
|
|
|
|
|
|
|
|
|
@ -670,11 +674,17 @@ class Wallet: |
|
|
|
|
|
|
|
with self.transaction_lock: |
|
|
|
self.transactions[tx_hash] = tx |
|
|
|
self.save_transactions() |
|
|
|
if self.verifier and tx_height>0: |
|
|
|
self.verifier.add(tx_hash, tx_height) |
|
|
|
self.update_tx_outputs(tx_hash) |
|
|
|
|
|
|
|
self.save() |
|
|
|
|
|
|
|
def save_transactions(self): |
|
|
|
tx = {} |
|
|
|
for k,v in self.transactions.items(): |
|
|
|
tx[k] = str(v) |
|
|
|
self.config.set_key('transactions', tx, True) |
|
|
|
|
|
|
|
|
|
|
|
def receive_history_callback(self, addr, hist): |
|
|
@ -684,7 +694,7 @@ class Wallet: |
|
|
|
|
|
|
|
with self.lock: |
|
|
|
self.history[addr] = hist |
|
|
|
self.save() |
|
|
|
self.config.set_key('addr_history', history, True) |
|
|
|
|
|
|
|
if hist != ['*']: |
|
|
|
for tx_hash, tx_height in hist: |
|
|
@ -893,6 +903,7 @@ class Wallet: |
|
|
|
|
|
|
|
|
|
|
|
def save(self): |
|
|
|
print_error("Warning: wallet.save() is deprecated") |
|
|
|
tx = {} |
|
|
|
for k,v in self.transactions.items(): |
|
|
|
tx[k] = str(v) |
|
|
|