tdefine pick_random_server - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 2f6075acfc509b0bed85980b8bd1a842565005a6 (DIR) parent 9d6a386f97af0037e398b9795859aa1fa3436e59 (HTM) Author: ThomasV <thomasv@gitorious> Date: Sun, 1 Apr 2012 17:50:12 +0200 define pick_random_server Diffstat: M client/interface.py | 2 +- M client/wallet.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) --- (DIR) diff --git a/client/interface.py b/client/interface.py t@@ -21,7 +21,7 @@ import random, socket, ast, re import threading, traceback, sys, time, json, Queue DEFAULT_TIMEOUT = 5 -DEFAULT_SERVERS = [ 'ecdsa.org:50001:t', 'electrum.novit.ro:50001:t'] # list of default servers +DEFAULT_SERVERS = [ 'ecdsa.org:50001:t', 'electrum.novit.ro:50001:t', 'electrum.bitcoins.sk:50001:t'] # list of default servers def old_to_new(s): (DIR) diff --git a/client/wallet.py b/client/wallet.py t@@ -277,9 +277,12 @@ class Wallet: # self.addresses_waiting_for_status = [] self.addresses_waiting_for_history = [] - self.server = random.choice( DEFAULT_SERVERS ) # random choice when the wallet is created + self.pick_random_server() + + def pick_random_server(self): + self.server = random.choice( DEFAULT_SERVERS ) # random choice when the wallet is created def is_up_to_date(self): return self.interface.responses.empty() and not ( self.addresses_waiting_for_status or self.addresses_waiting_for_history )