Snode version patch (#1561)

* Snode version number

Getting the version number from the API and checking the last node in the onion routing, making sure its version is at least 2.8.0

* Clearing the snode and onion request dbs on launch

* Removing logs

* Tweak to snode filtering

* PR feedback
This commit is contained in:
ThomasSession
2024-07-23 17:52:53 +10:00
committed by GitHub
parent 9957edd5ac
commit 79ae27d7b6
8 changed files with 122 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ interface LokiAPIDatabaseProtocol {
fun getSnodePool(): Set<Snode>
fun setSnodePool(newValue: Set<Snode>)
fun getOnionRequestPaths(): List<List<Snode>>
fun clearSnodePool()
fun clearOnionRequestPaths()
fun setOnionRequestPaths(newValue: List<List<Snode>>)
fun getSwarm(publicKey: String): Set<Snode>?

View File

@@ -1,6 +1,6 @@
package org.session.libsignal.utilities
class Snode(val address: String, val port: Int, val publicKeySet: KeySet?) {
class Snode(val address: String, val port: Int, val publicKeySet: KeySet?, val version: String) {
val ip: String get() = address.removePrefix("https://")
public enum class Method(val rawValue: String) {