1
0

json rpc daemon

This commit is contained in:
ThomasV
2014-01-23 17:06:47 +01:00
parent 0bc42a1f1f
commit be506af246
5 changed files with 126 additions and 53 deletions

View File

@@ -82,6 +82,14 @@ class Network(threading.Thread):
return self.interface and self.interface.is_connected
def is_up_to_date(self):
return self.interface.is_up_to_date()
def main_server(self):
return self.interface.server
def send_subscriptions(self):
for cb, sub in self.subscriptions.items():
self.interface.send(sub, cb)
@@ -372,11 +380,11 @@ class Network(threading.Thread):
return out
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)
#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)
def parse_servers(self, result):