more efficient method for exporting private keys
authorthomasv <thomasv@gitorious>
Tue, 26 Feb 2013 15:29:23 +0000 (16:29 +0100)
committerthomasv <thomasv@gitorious>
Tue, 26 Feb 2013 15:29:23 +0000 (16:29 +0100)
lib/gui_qt.py

index af13da6..a5856f8 100644 (file)
@@ -1760,9 +1760,9 @@ class ElectrumWindow(QMainWindow):
                     transaction = csv.writer(csvfile)
                     transaction.writerow(["address", "private_key"])
 
-                    for addr in self.wallet.all_addresses():
-                        m_addr = "%34s"%addr
-                        transaction.writerow([m_addr, str(self.wallet.get_private_key(addr, password))])
+                    
+                    for addr, pk in self.wallet.get_private_keys(self.wallet.all_addresses(), password).items():
+                        transaction.writerow(["%34s"%addr,pk])
 
                     self.show_message(_("Private keys exported."))