Cyclon exchange_view() should not return back to the source a partialView containing the source's ip
robzenn92 opened this issue · 1 comments
robzenn92 commented
In cyclon/app.py
the following piece of code is wrong.
source = message.get('source')
size = received_partial_view.size
to_avoid = None
if cyclon.partialView.contains_ip(source):
to_avoid = cyclon.partialView.get_peer_by_ip(source)
to_send = cyclon.partialView.select_neighbors(to_avoid, size)
In fact, source
is in the form http://<source_ip>:<port>
while both cyclon.partialView.contains_ip
and cyclon.partialView.get_peer_by_ip
expect an IP. Hence, to_avoid
value was alway None
.
robzenn92 commented
The code is not needed anymore cause cyclon returns a random subset of descriptors no matter if the source ip is included or not.