electrum

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

commit 1d0fd3784a57e2c67072e1d27c0d65fc256aef77
parent e455dc5a6bd4c7919540050579d6111313eec9b6
Author: ThomasV <thomasv1@gmx.de>
Date:   Tue, 10 Sep 2013 14:36:10 -0700

Merge pull request #292 from ctrlcctrlv/master

Fix some bugs I found in 1.9
Diffstat:
Mgui/gui_classic.py | 4+++-
Mlib/bitcoin.py | 5++++-
Mlib/commands.py | 2+-
3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gui/gui_classic.py b/gui/gui_classic.py @@ -1944,8 +1944,10 @@ class ElectrumWindow(QMainWindow): transaction = csv.writer(csvfile) transaction.writerow(["address", "private_key"]) + addresses = self.wallet.addresses(True) - for addr, pk in self.wallet.get_private_keys(self.wallet.addresses(True), password).items(): + for addr in addresses: + pk = "".join(self.wallet.get_private_key(addr, password)) transaction.writerow(["%34s"%addr,pk]) self.show_message(_("Private keys exported.")) diff --git a/lib/bitcoin.py b/lib/bitcoin.py @@ -286,7 +286,10 @@ SECP256k1 = ecdsa.curves.Curve("SECP256k1", curve_secp256k1, generator_secp256k1 from ecdsa.util import string_to_number, number_to_string def msg_magic(message): - return "\x18Bitcoin Signed Message:\n" + chr( len(message) ) + message + varint = var_int(len(message)) + encoded_varint = "".join([chr(int(varint[i:i+2], 16)) for i in xrange(0, len(varint), 2)]) + + return "\x18Bitcoin Signed Message:\n" + encoded_varint + message class EC_KEY(object): diff --git a/lib/commands.py b/lib/commands.py @@ -155,7 +155,7 @@ class Commands: def dumpprivkeys(self, addresses = None): if addresses is None: addresses = self.wallet.addresses(True) - return self.wallet.get_private_keys(addresses, self.password) + return [self.wallet.get_private_key(address, self.password) for address in addresses] def validateaddress(self,addr): isvalid = is_valid(addr)