make daemon usable with the GUI
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user