Bump to aiorpcX version 0.4.4
Update peers.py to not pass local_addr to proxy
This commit is contained in:
parent
0f4f51d932
commit
c11ad5d189
@ -517,6 +517,11 @@ class PeerManager(util.LoggedClass):
|
|||||||
kind, port = port_pairs[0]
|
kind, port = port_pairs[0]
|
||||||
sslc = ssl.SSLContext(ssl.PROTOCOL_TLS) if kind == 'SSL' else None
|
sslc = ssl.SSLContext(ssl.PROTOCOL_TLS) if kind == 'SSL' else None
|
||||||
|
|
||||||
|
host = self.env.cs_host(for_rpc=False)
|
||||||
|
if isinstance(host, list):
|
||||||
|
host = host[0]
|
||||||
|
|
||||||
|
kwargs = {'ssl': sslc}
|
||||||
if self.env.force_proxy or peer.is_tor:
|
if self.env.force_proxy or peer.is_tor:
|
||||||
# Only attempt a proxy connection if the proxy is up
|
# Only attempt a proxy connection if the proxy is up
|
||||||
if not self.proxy:
|
if not self.proxy:
|
||||||
@ -524,17 +529,13 @@ class PeerManager(util.LoggedClass):
|
|||||||
create_connection = self.proxy.create_connection
|
create_connection = self.proxy.create_connection
|
||||||
else:
|
else:
|
||||||
create_connection = self.loop.create_connection
|
create_connection = self.loop.create_connection
|
||||||
|
# Use our listening Host/IP for outgoing connections so
|
||||||
# Use our listening Host/IP for outgoing connections so our
|
# our peers see the correct source.
|
||||||
# peers see the correct source.
|
if host:
|
||||||
host = self.env.cs_host(for_rpc=False)
|
kwargs['local_addr'] = (host, None)
|
||||||
if isinstance(host, list):
|
|
||||||
host = host[0]
|
|
||||||
local_addr = (host, None) if host else None
|
|
||||||
|
|
||||||
protocol_factory = partial(PeerSession, peer, self, kind)
|
protocol_factory = partial(PeerSession, peer, self, kind)
|
||||||
coro = create_connection(protocol_factory, peer.host, port, ssl=sslc,
|
coro = create_connection(protocol_factory, peer.host, port, **kwargs)
|
||||||
local_addr=local_addr)
|
|
||||||
callback = partial(self.connection_done, peer, port_pairs)
|
callback = partial(self.connection_done, peer, port_pairs)
|
||||||
self.ensure_future(coro, callback)
|
self.ensure_future(coro, callback)
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ setuptools.setup(
|
|||||||
# "x11_hash" package (1.4) is required to sync DASH network.
|
# "x11_hash" package (1.4) is required to sync DASH network.
|
||||||
# "tribus_hash" package is required to sync Denarius network.
|
# "tribus_hash" package is required to sync Denarius network.
|
||||||
# "blake256" package is required to sync Decred network.
|
# "blake256" package is required to sync Decred network.
|
||||||
install_requires=['aiorpcX >= 0.4.1', 'plyvel', 'pylru', 'aiohttp >= 1'],
|
install_requires=['aiorpcX >= 0.4.4', 'plyvel', 'pylru', 'aiohttp >= 1'],
|
||||||
packages=setuptools.find_packages(exclude=['tests']),
|
packages=setuptools.find_packages(exclude=['tests']),
|
||||||
description='ElectrumX Server',
|
description='ElectrumX Server',
|
||||||
author='Neil Booth',
|
author='Neil Booth',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user