electrum

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

commit af0d8d664b3abaff8a02320fef8a023502885e12
parent 10d6db468ab6b9ed11cdc95f171d0adca1c0105f
Author: thomasv <thomasv@gitorious>
Date:   Mon, 22 Oct 2012 15:44:54 +0200

save list of verified tx only when needed

Diffstat:
Mlib/wallet.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -951,7 +951,7 @@ class WalletVerifier(threading.Thread): self.merkle_roots = config.get('merkle_roots',{}) self.headers = config.get('block_headers',{}) self.lock = threading.Lock() - self.saved = False + self.saved = True def run(self): requested = [] @@ -964,13 +964,14 @@ class WalletVerifier(threading.Thread): if tx not in requested: requested.append(tx) self.request_merkle(tx) + self.saved = False break try: r = self.interface.get_response('verifier',timeout=1) except Queue.Empty: if len(self.validated) == len(txlist) and not self.saved: - print "verified %d transactions"%len(txlist) + print "saving verified transactions" self.config.set_key('verified_tx', self.validated, True) self.saved = True continue