alexdovzhanyn / elixium_core

A privacy-preserving decentralized application network
https://www.elixiumnetwork.org/
281 stars 37 forks source link

Multiple handlers attempting a connection to the same peer #47

Closed alexdovzhanyn closed 6 years ago

alexdovzhanyn commented 6 years ago

Sometimes, when starting a peer, some or all of its handlers attempt a connection to the same peer. I suspect that this happens because when we call save_known_peer in connection_handler.ex, we're not saving unique peers, we're saving all peers. Here's a screenshot of what happens:

screen shot 2018-08-27 at 8 49 38 pm

This should be a relatively simple fix: just change the function in store/peer.ex to ensure only unique items are saved.

alexdovzhanyn commented 6 years ago

Fixed in 0.2.4