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

@@ -41,7 +41,7 @@ class Blockchain(util.DaemonThread):
def run(self):
self.init_headers_file()
self.set_local_height()
print_error( "blocks:", self.local_height )
self.print_error("%d blocks"%self.local_height)
while self.is_running():
try:
@@ -77,6 +77,8 @@ class Blockchain(util.DaemonThread):
continue
self.network.new_blockchain_height(height, i)
self.print_error("stopped")
def verify_chain(self, chain):
@@ -267,7 +269,7 @@ class Blockchain(util.DaemonThread):
i.send_request({'method':'blockchain.block.get_header', 'params':[h]}, queue)
def retrieve_request(self, queue):
while True:
while self.is_running():
try:
ir = queue.get(timeout=1)
except Queue.Empty: