Tribler/py-ipv8

Peer addresses aren't being updated

egbertbouman opened this issue · 0 comments

Peers sometimes fail to respond to introduction-requests. I noticed this behaviour before, and figured it would probably be due to max_peers being reached. However, after some debugging, I found that peer.address isn't updating.

The problem is as follows: on_introduction_request calls add_verified_peer in order to perform an address update (if needed). However, the address that it uses for updating is still the old address. This is because lazy_wrapper gets the peer from self.network.verified_by_public_key_bin, which contains old address.