relay: split descriptors to {our,all}_descriptors

Now that we have ephemeral relays, we don't want them used everywhere
This commit is contained in:
William Casarin
2023-05-10 12:20:33 -07:00
parent 1367be0d10
commit fe6d7e5118
10 changed files with 17 additions and 13 deletions

View File

@@ -42,7 +42,11 @@ class RelayPool {
network_monitor.start(queue: network_monitor_queue)
}
var descriptors: [RelayDescriptor] {
var our_descriptors: [RelayDescriptor] {
return all_descriptors.filter { d in !d.info.ephemeral }
}
var all_descriptors: [RelayDescriptor] {
relays.map { r in r.descriptor }
}