Use Peer.ID instead of Peer.Key as peer identifier (#664)

Replace Peer.Key as internal identifier with a randomly generated Peer.ID 
in the Management service.
Every group now references peers by ID instead of a public key.
Every route now references peers by ID instead of a public key.
FileStore does store.json file migration on startup by generating Peer.ID and replacing
all Peer.Key identifier references .
This commit is contained in:
Misha Bragin
2023-02-03 10:33:28 +01:00
committed by GitHub
parent 9e408b5bbc
commit 9adadfade4
22 changed files with 485 additions and 359 deletions

View File

@@ -207,7 +207,7 @@ func (w *Worker) generateProperties() properties {
osUIClients[uiOSKey] = osUICount + 1
}
_, connected := connections[peer.Key]
_, connected := connections[peer.ID]
if connected || peer.Status.LastSeen.After(w.lastRun) {
activePeersLastDay++
osActiveKey := osKey + "_active"