Ignore hosts not appearing in their own features

This commit is contained in:
Neil Booth 2017-04-09 14:02:32 +09:00
parent c0ff2c0c20
commit b6d8b86dd6

View File

@ -114,8 +114,11 @@ class PeerSession(JSONSession):
if our_hash != features.get('genesis_hash'):
self.bad = True
self.log_warning('incorrect genesis hash')
else:
elif self.peer.host in features.get('hosts', {}):
self.peer.update_features(features)
else:
self.bad = True
self.log_warning('marking DNS alias bad')
self.close_if_done()
def on_headers(self, result, error):