electrum

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

commit 5127dabb0df823529161a392490ec0357ad8affb
parent c44f53bcaafc1f41f2c275969746794c5d0cc13f
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  6 Oct 2017 04:55:11 +0200

Merge pull request #3004 from SomberNight/wallet_conversion_v13_to_v14

fix: v13 to v14 wallet (with Imported_KeyStore) conversion
Diffstat:
Mlib/storage.py | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/storage.py b/lib/storage.py @@ -345,13 +345,13 @@ class WalletStorage(PrintError): self.put('addresses', addresses) elif self.get('wallet_type') == 'standard': if self.get('keystore').get('type')=='imported': - addresses = self.get('addresses').get('receiving') - pubkeys = self.get('pubkeys').get('receiving') + addresses = set(self.get('addresses').get('receiving')) + pubkeys = self.get('keystore').get('keypairs').keys() assert len(addresses) == len(pubkeys) d = {} - for i in range(len(addresses)): - addr = addresses[i] - pubkey = pubkeys[i] + for pubkey in pubkeys: + addr = bitcoin.pubkey_to_address('p2pkh', pubkey) + assert addr in addresses d[addr] = { 'pubkey':pubkey, 'type':'p2pkh'} self.put('addresses', d) self.put('pubkeys', None)