relays: keep in sync with user relay list

Still need to figure out how to ensure new bootstrap relays are added...

Changelog-Changed: Ensure contact relay list is kept in sync with internal relay pool
This commit is contained in:
William Casarin
2022-12-29 15:23:34 -08:00
parent 2867da61ca
commit 3824e95f29
8 changed files with 87 additions and 49 deletions

View File

@@ -28,12 +28,14 @@ class Relay: Identifiable {
let descriptor: RelayDescriptor
let connection: RelayConnection
var last_pong: UInt32
var flags: Int
init(descriptor: RelayDescriptor, connection: RelayConnection) {
self.flags = 0
self.descriptor = descriptor
self.connection = connection
self.last_pong = 0
}
func mark_broken() {