fix(storage): only enable private queries when DHT mix proxies are configured (#1465)

Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
This commit is contained in:
Chrysostomos Nanakos 2026-06-20 22:31:34 +03:00 committed by GitHub
parent 814e7a5436
commit ceea23550b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,8 +120,10 @@ proc start*(s: StorageServer) {.async.} =
s.storageNode.discovery.mixProto = mixProto
discard s.storageNode.discovery.togglePrivateQueries(s.config.mixEnabled).valueOr:
raise newException(StorageError, "Failed to enable private queries: " & error.msg)
if s.config.dhtMixProxies.len > 0:
discard s.storageNode.discovery.togglePrivateQueries(true).valueOr:
raise
newException(StorageError, "Failed to enable private queries: " & error.msg)
s.storageNode.engine.network.excludeRelays(relayPool.keys.toSeq)