1
0

slightly better notifications. at least, it fixes #652

This commit is contained in:
ThomasV
2014-04-17 17:38:21 +02:00
parent 696766c370
commit 80a988e337
5 changed files with 9 additions and 8 deletions

View File

@@ -45,6 +45,7 @@ class NetworkProxy(threading.Thread):
self.subscriptions = {}
self.debug = False
self.lock = threading.Lock()
self.pending_transactions_for_notifications = []
def start(self, start_daemon=False):

View File

@@ -105,7 +105,6 @@ class Interface(threading.Thread):
#json
self.message_id = 0
self.unanswered_requests = {}
self.pending_transactions_for_notifications= []
# parse server
self.server = server

View File

@@ -111,6 +111,7 @@ class Network(threading.Thread):
self.subscriptions = {}
self.subscriptions[self.on_banner] = [('server.banner',[])]
self.subscriptions[self.on_peers] = [('server.peers.subscribe',[])]
self.pending_transactions_for_notifications = []
def is_connected(self):

View File

@@ -1103,7 +1103,7 @@ class NewWallet:
print_error("received transaction that is no longer referenced in history", tx_hash)
return
self.transactions[tx_hash] = tx
self.network.interface.pending_transactions_for_notifications.append(tx)
self.network.pending_transactions_for_notifications.append(tx)
self.save_transactions()
if self.verifier and tx_height>0:
self.verifier.add(tx_hash, tx_height)