URI: 
       tcleanup - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit be7de01bf79e257d275561dbc11570ef46312b8f
   DIR parent 4c9673849fc693bbcfe5f5e5aff05c01813f44d1
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Fri, 23 Mar 2012 21:12:16 +0100
       
       cleanup
       
       Diffstat:
         M client/wallet.py                    |      16 ++++++----------
       
       1 file changed, 6 insertions(+), 10 deletions(-)
       ---
   DIR diff --git a/client/wallet.py b/client/wallet.py
       t@@ -17,7 +17,7 @@
        # along with this program. If not, see <http://www.gnu.org/licenses/>.
        
        
       -import sys, base64, os, re, hashlib, copy, operator, ast, threading
       +import sys, base64, os, re, hashlib, copy, operator, ast, threading, random
        
        try:
            import ecdsa  
       t@@ -230,6 +230,8 @@ def format_satoshis(x, is_diff=False):
        
        
        from version import ELECTRUM_VERSION, SEED_VERSION
       +from interface import NativeInterface, AsynchronousInterface, HttpInterface, DEFAULT_SERVERS
       +
        
        DEFAULT_PORT = 50000
        
       t@@ -259,6 +261,9 @@ class Wallet:
                self.receipt = None          # next receipt
                self.addressbook = []        # outgoing addresses, for payments
        
       +        self.host = random.choice( DEFAULT_SERVERS )         # random choice when the wallet is created
       +        self.port = DEFAULT_PORT
       +
                # not saved
                self.tx_history = {}
        
       t@@ -523,7 +528,6 @@ class Wallet:
                    'fee':self.fee,
                    'host':self.host,
                    'port':self.port,
       -            #'blocks':self.interface.blocks,
                    'seed':self.seed,
                    'addresses':self.addresses,
                    'change_addresses':self.change_addresses,
       t@@ -550,8 +554,6 @@ class Wallet:
                    data = f.read()
                    f.close()
                except:
       -            self.host = ''
       -            self.port = DEFAULT_PORT
                    return
                try:
                    d = ast.literal_eval( data )
       t@@ -972,12 +974,6 @@ class Wallet:
                    self.handle_response(response)
        
            def start_interface(self):
       -        from interface import NativeInterface, AsynchronousInterface, HttpInterface, DEFAULT_SERVERS
       -        import random
       -
       -        if not self.host:
       -            self.host = random.choice( DEFAULT_SERVERS )         # random choice when the wallet is created
       -        
                if self.port == 50000:
                    InterfaceClass = NativeInterface
                elif self.port == 50001: