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]
|
||||
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:
|
||||
# Only attempt a proxy connection if the proxy is up
|
||||
if not self.proxy:
|
||||
@ -524,17 +529,13 @@ class PeerManager(util.LoggedClass):
|
||||
create_connection = self.proxy.create_connection
|
||||
else:
|
||||
create_connection = self.loop.create_connection
|
||||
|
||||
# Use our listening Host/IP for outgoing connections so our
|
||||
# peers see the correct source.
|
||||
host = self.env.cs_host(for_rpc=False)
|
||||
if isinstance(host, list):
|
||||
host = host[0]
|
||||
local_addr = (host, None) if host else None
|
||||
# Use our listening Host/IP for outgoing connections so
|
||||
# our peers see the correct source.
|
||||
if host:
|
||||
kwargs['local_addr'] = (host, None)
|
||||
|
||||
protocol_factory = partial(PeerSession, peer, self, kind)
|
||||
coro = create_connection(protocol_factory, peer.host, port, ssl=sslc,
|
||||
local_addr=local_addr)
|
||||
coro = create_connection(protocol_factory, peer.host, port, **kwargs)
|
||||
callback = partial(self.connection_done, peer, port_pairs)
|
||||
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.
|
||||
# "tribus_hash" package is required to sync Denarius 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']),
|
||||
description='ElectrumX Server',
|
||||
author='Neil Booth',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user