1
0

fix synchronizer hanging when not connected.

This commit is contained in:
ThomasV
2015-03-14 08:43:43 +01:00
parent c3cba78659
commit a4cb70649d
6 changed files with 18 additions and 12 deletions

View File

@@ -97,13 +97,12 @@ class TxVerifier(util.DaemonThread):
if self.network.send([ ('blockchain.transaction.get_merkle',[tx_hash, tx_height]) ], self.queue.put):
print_error('requesting merkle', tx_hash)
requested_merkle.append(tx_hash)
try:
r = self.queue.get(timeout=0.1)
except Queue.Empty:
continue
if not r: continue
if not r:
continue
if r.get('error'):
print_error('Verifier received an error:', r)
@@ -118,6 +117,8 @@ class TxVerifier(util.DaemonThread):
tx_hash = params[0]
self.verify_merkle(tx_hash, result)
self.print_error("stopped")
def verify_merkle(self, tx_hash, result):
tx_height = result.get('block_height')