separate network layer from synchronizer
This commit is contained in:
@@ -654,6 +654,13 @@ class Network(util.DaemonThread):
|
||||
# Response is now in canonical form
|
||||
self.process_response(interface, response, callbacks)
|
||||
|
||||
def subscribe_to_addresses(self, addresses, callback):
|
||||
msgs = [('blockchain.address.subscribe', [x]) for x in addresses]
|
||||
self.send(msgs, callback)
|
||||
|
||||
def request_address_history(self, address, callback):
|
||||
self.send([('blockchain.address.get_history', [address])], callback)
|
||||
|
||||
def send(self, messages, callback):
|
||||
'''Messages is a list of (method, params) tuples'''
|
||||
messages = list(messages)
|
||||
|
||||
Reference in New Issue
Block a user