replace RelayMetadatas with RelayModelCache in DamusState

Signed-off-by: Bryan Montz <bryanmontz@me.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Bryan Montz
2023-07-09 08:45:38 -05:00
committed by William Casarin
parent f619fef410
commit 51d71f11c1
9 changed files with 23 additions and 40 deletions

View File

@@ -114,8 +114,13 @@ class RelayPool {
}
let relay = Relay(descriptor: desc, connection: conn)
self.relays.append(relay)
}
func setLog(_ log: RelayLog, for relay_id: String) {
// add the current network state to the log
log.add("Network state: \(network_monitor.currentPath.status)")
relay.connection.log.add("Network state: \(network_monitor.currentPath.status)")
get_relay(relay_id)?.connection.log = log
}
/// This is used to retry dead connections