electrum

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

commit 2f6075acfc509b0bed85980b8bd1a842565005a6
parent 9d6a386f97af0037e398b9795859aa1fa3436e59
Author: ThomasV <thomasv@gitorious>
Date:   Sun,  1 Apr 2012 17:50:12 +0200

define pick_random_server

Diffstat:
Mclient/interface.py | 2+-
Mclient/wallet.py | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/interface.py b/client/interface.py @@ -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): diff --git a/client/wallet.py b/client/wallet.py @@ -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 )