1
0

add multiplexing capability to NotificationSession, simplify interface

This commit is contained in:
ThomasV
2018-09-11 14:57:59 +02:00
parent 1728dff576
commit 3b6af914e1
2 changed files with 40 additions and 41 deletions

View File

@@ -141,9 +141,7 @@ class Synchronizer(PrintError):
async def subscribe_to_address(self, addr):
h = address_to_scripthash(addr)
self.scripthash_to_address[h] = addr
self.session.scripthash = self.status_queue
status = await self.session.send_request('blockchain.scripthash.subscribe', [h])
await self.status_queue.put((h, status))
await self.session.subscribe('blockchain.scripthash.subscribe', [h], self.status_queue)
self.requested_addrs.remove(addr)
async def send_subscriptions(self, interface):