Connects to the bootstrap node, though it fails since it doesn't handshake yet.
Keeps a list of connected peers
I moved this entire thing to peerManager because the previous implementation of holding them in Network and then having the individual Peer stored in Network.peers call the network object to remove itself from the peers list looks like an awful practice.
Persists a list of known peers
Storing this in a file on disk, because the DB provided by the LV Leitung can only be instantiated once and by storing the peers as well as objects there we lose TS support, so I prefer this.
This persists through docker-compose up and shutdowns, but is cleared on docker-compose build.
Refactored the god-awful fake singleton classes to plain old JS objects
It was getting on my nerves. Better to do it now before our code relies on this bad design pattern.
Closes #6
Based on #10 for convenience
Features
Connects to the bootstrap node, though it fails since it doesn't handshake yet.
Keeps a list of connected peers I moved this entire thing to
peerManager
because the previous implementation of holding them inNetwork
and then having the individualPeer
stored inNetwork.peers
call thenetwork
object to remove itself from thepeers
list looks like an awful practice.Persists a list of known peers Storing this in a file on disk, because the DB provided by the LV Leitung can only be instantiated once and by storing the peers as well as objects there we lose TS support, so I prefer this.
This persists through
docker-compose up
and shutdowns, but is cleared ondocker-compose build
.Refactored the god-awful fake singleton classes to plain old JS objects It was getting on my nerves. Better to do it now before our code relies on this bad design pattern.