bitcoin-elixir v0.0.1 Bitcoin.Node.Network.Peer
Connection handler. Manages peer state, sends mesasges, responds to pings etc.
TODO maybe we should consider splitting connection and peer to separate genservers. This will double number of processes, but it shouldn’t be a problem below a few hundred thousad peers. The problem is that API for accessing it from the outside may be a bit more complicated (connection should be a master to peer, but we probably rather want to call higher level functions on peer)
TODO close connection if there’s no successful handshake within specific time