Update to aiorpcx 0.8.0

This commit is contained in:
Neil Booth 2018-09-12 17:16:56 +01:00 committed by Vivek Teega
parent 8ff2189794
commit ded1f6d130
4 changed files with 8 additions and 8 deletions

View File

@ -80,8 +80,8 @@ class Controller(ServerBase):
'''Start the RPC server and wait for the mempool to synchronize. Then '''Start the RPC server and wait for the mempool to synchronize. Then
start serving external clients. start serving external clients.
''' '''
if not (0, 7, 3) <= aiorpcx_version < (0, 8): if not (0, 8, 0) <= aiorpcx_version < (0, 9):
raise RuntimeError('aiorpcX version 0.7.x required with x >= 3') raise RuntimeError('aiorpcX version 0.8.x required')
env = self.env env = self.env
min_str, max_str = env.coin.SESSIONCLS.protocol_min_max_strings() min_str, max_str = env.coin.SESSIONCLS.protocol_min_max_strings()

View File

@ -305,7 +305,7 @@ class MemPool(object):
async def keep_synchronized(self, synchronized_event): async def keep_synchronized(self, synchronized_event):
'''Keep the mempool synchronized with the daemon.''' '''Keep the mempool synchronized with the daemon.'''
async with TaskGroup(wait=any) as group: async with TaskGroup() as group:
await group.spawn(self._refresh_hashes(synchronized_event)) await group.spawn(self._refresh_hashes(synchronized_event))
await group.spawn(self._refresh_histogram(synchronized_event)) await group.spawn(self._refresh_histogram(synchronized_event))
await group.spawn(self._logging(synchronized_event)) await group.spawn(self._logging(synchronized_event))

View File

@ -290,10 +290,10 @@ class PeerManager(object):
peer.features['server_version'] = server_version peer.features['server_version'] = server_version
ptuple = protocol_tuple(protocol_version) ptuple = protocol_tuple(protocol_version)
# FIXME: Make concurrent preserving the exception async with TaskGroup() as g:
await self._send_headers_subscribe(session, peer, ptuple) await g.spawn(self._send_headers_subscribe(session, peer, ptuple))
await self._send_server_features(session, peer) await g.spawn(self._send_server_features(session, peer))
await self._send_peers_subscribe(session, peer) await g.spawn(self._send_peers_subscribe(session, peer))
async def _send_headers_subscribe(self, session, peer, ptuple): async def _send_headers_subscribe(self, session, peer, ptuple):
message = 'blockchain.headers.subscribe' message = 'blockchain.headers.subscribe'

View File

@ -12,7 +12,7 @@ setuptools.setup(
# "blake256" package is required to sync Decred network. # "blake256" package is required to sync Decred network.
# "xevan_hash" package is required to sync Xuez network. # "xevan_hash" package is required to sync Xuez network.
# "groestlcoin_hash" package is required to sync Groestlcoin network. # "groestlcoin_hash" package is required to sync Groestlcoin network.
install_requires=['aiorpcX>=0.7.3,<0.8', 'attrs', install_requires=['aiorpcX>=0.8.0,<0.9', 'attrs',
'plyvel', 'pylru', 'aiohttp >= 2'], 'plyvel', 'pylru', 'aiohttp >= 2'],
packages=setuptools.find_packages(include=('electrumx*',)), packages=setuptools.find_packages(include=('electrumx*',)),
description='ElectrumX Server', description='ElectrumX Server',