1
0

make daemon usable with the GUI

This commit is contained in:
ThomasV
2014-07-24 10:59:13 +02:00
parent ab41c6f940
commit 9ee0614edb
10 changed files with 333 additions and 259 deletions

View File

@@ -221,6 +221,7 @@ class Network(threading.Thread):
self.start_interfaces()
threading.Thread.start(self)
if wait:
raise
return self.wait_until_connected()
def wait_until_connected(self):
@@ -420,25 +421,3 @@ class Network(threading.Thread):
return self.blockchain.height()
#def retrieve_transaction(self, tx_hash, tx_height=0):
# import transaction
# r = self.synchronous_get([ ('blockchain.transaction.get',[tx_hash, tx_height]) ])[0]
# if r:
# return transaction.Transaction(r)
if __name__ == "__main__":
network = NetworkProxy({})
network.start()
print network.get_servers()
q = Queue.Queue()
network.send([('blockchain.headers.subscribe',[])], q.put)
while True:
r = q.get(timeout=10000)
print r