From 74735bd64e2fe0907b5730913de0011217b6d8be Mon Sep 17 00:00:00 2001 From: thomasv Date: Tue, 10 Sep 2013 16:13:30 +0200 Subject: [PATCH] minor fixes --- lib/verifier.py | 9 +++++---- lib/wallet.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/verifier.py b/lib/verifier.py index 097dd98..b2a9c9b 100644 --- a/lib/verifier.py +++ b/lib/verifier.py @@ -27,12 +27,13 @@ from bitcoin import * class TxVerifier(threading.Thread): """ Simple Payment Verification """ - def __init__(self, interface, blockchain, storage): + def __init__(self, network, storage): threading.Thread.__init__(self) self.daemon = True self.storage = storage - self.blockchain = blockchain - self.interface = interface + self.network = network + self.blockchain = network.blockchain + self.interface = network.interface self.transactions = {} # requested verifications (with height sent by the requestor) self.interface.register_channel('txverifier') self.verified_tx = storage.get('verified_tx3',{}) # height, timestamp of verified transactions @@ -143,7 +144,7 @@ class TxVerifier(threading.Thread): self.verified_tx[tx_hash] = (tx_height, timestamp, pos) print_error("verified %s"%tx_hash) self.storage.put('verified_tx3', self.verified_tx, True) - self.interface.trigger_callback('updated') + self.network.trigger_callback('updated') def hash_merkle_root(self, merkle_s, target_hash, pos): diff --git a/lib/wallet.py b/lib/wallet.py index b247bfd..718f56e 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1351,7 +1351,7 @@ class Wallet: from verifier import TxVerifier self.network = network self.interface = network.interface - self.verifier = TxVerifier(self.interface, network.blockchain, self.storage) + self.verifier = TxVerifier(self.network, self.storage) self.verifier.start() self.set_verifier(self.verifier) self.synchronizer = WalletSynchronizer(self) -- 1.7.1