Browse Source

Dynamically expand index_cache if too small

Re-application of 502b6a82a3
master
Adam Gibson 9 years ago
parent
commit
c878393df9
No known key found for this signature in database
GPG Key ID: B3AE09F1E9A3197A
  1. 7
      jmclient/jmclient/wallet.py

7
jmclient/jmclient/wallet.py

@ -183,6 +183,13 @@ class Wallet(AbstractWallet):
walletdata['network'], get_network()))
if 'index_cache' in walletdata:
self.index_cache = walletdata['index_cache']
if self.max_mix_depth > len(self.index_cache):
#This can happen e.g. in tumbler when we need more mixdepths
#than currently exist. Since we have no info for those extra
#depths, we must default to (0,0) (but sync should find used
#adddresses).
self.index_cache += [[0,0]] * (
self.max_mix_depth - len(self.index_cache))
password_key = btc.bin_dbl_sha256(pwd)
encrypted_seed = walletdata['encrypted_seed']
try:

Loading…
Cancel
Save