Merge branch 'develop'
This commit is contained in:
commit
ddbc13653f
@ -132,6 +132,12 @@ version for the release of 1.0.
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
Version 0.99.2
|
||||
--------------
|
||||
|
||||
* don't announce self if a non-public IP address
|
||||
* logging tweaks
|
||||
|
||||
Version 0.99.1
|
||||
--------------
|
||||
|
||||
|
||||
@ -112,14 +112,17 @@ class PeerSession(JSONSession):
|
||||
|
||||
self.peer_mgr.add_peers(peers)
|
||||
|
||||
# Announce ourself if not present. Don't if disabled or we
|
||||
# are a non-public IP address.
|
||||
if not self.peer_mgr.env.peer_announce:
|
||||
return
|
||||
|
||||
# Announce ourself if not present
|
||||
my = self.peer_mgr.my_clearnet_peer()
|
||||
if not my.is_public:
|
||||
return
|
||||
for peer in my.matches(peers):
|
||||
if peer.tcp_port == my.tcp_port and peer.ssl_port == my.ssl_port:
|
||||
return
|
||||
|
||||
self.log_info('registering ourself with server.add_peer')
|
||||
self.send_request(self.on_add_peer, 'server.add_peer', [my.features])
|
||||
|
||||
@ -308,8 +311,9 @@ class PeerManager(util.LoggedClass):
|
||||
'''Add peers from an incoming connection.'''
|
||||
peers = Peer.peers_from_features(features, source)
|
||||
if peers:
|
||||
self.log_info('add_peer request received from {}'
|
||||
.format(peers[0].host))
|
||||
hosts = [peer.host for peer in peers]
|
||||
self.log_info('add_peer request from {} for {}'
|
||||
.format(source, ', '.join(hosts)))
|
||||
self.add_peers(peers, check_ports=True)
|
||||
return bool(peers)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Server name and protocol versions
|
||||
|
||||
VERSION = 'ElectrumX 0.99.1'
|
||||
VERSION = 'ElectrumX 0.99.2'
|
||||
PROTOCOL_MIN = '1.0'
|
||||
PROTOCOL_MAX = '1.0'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user