1
0

update interface.py

This commit is contained in:
ThomasV
2014-07-28 00:13:40 +02:00
parent 035ecbc7cd
commit 28df27fba2
6 changed files with 249 additions and 332 deletions

View File

@@ -289,14 +289,14 @@ class Blockchain(threading.Thread):
def request_header(self, i, h, queue):
print_error("requesting header %d from %s"%(h, i.server))
i.send([ ('blockchain.block.get_header',[h])], lambda i,r: queue.put((i,r)))
i.send_request({'method':'blockchain.block.get_header', 'params':[h]}, queue)
def retrieve_header(self, i, queue):
while True:
try:
ir = queue.get(timeout=1)
except Queue.Empty:
print_error('timeout')
print_error('retrieve_header: timeout', i.server)
continue
if not ir: