Throws an error if the RelayStats cannot be created.

This commit is contained in:
Vitor Pamplona
2025-09-24 12:38:01 -04:00
parent f9e0c82fc8
commit 6ba60dce3f

View File

@@ -29,7 +29,7 @@ object RelayStats {
override fun create(key: NormalizedRelayUrl): RelayStat = RelayStat()
}
fun get(url: NormalizedRelayUrl): RelayStat = innerCache.get(url) ?: RelayStat()
fun get(url: NormalizedRelayUrl): RelayStat = innerCache.get(url) ?: throw IllegalArgumentException("Should never happen")
fun addBytesReceived(
url: NormalizedRelayUrl,