From 33aeb942b2af619f100c65b3f5b020f54f3c00a3 Mon Sep 17 00:00:00 2001 From: dr7ana Date: Thu, 24 Oct 2024 06:35:42 -0700 Subject: [PATCH] squash; kick le net --- llarp/contact/client_contact.hpp | 8 ++------ llarp/dht/node.hpp | 2 +- llarp/handlers/session.cpp | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/llarp/contact/client_contact.hpp b/llarp/contact/client_contact.hpp index 17d7143932..81c496443a 100644 --- a/llarp/contact/client_contact.hpp +++ b/llarp/contact/client_contact.hpp @@ -46,12 +46,8 @@ namespace llarp TCP2QUIC = 1 << 5, }; - /** TODO: - - LocalCC - - holds the derived Ed25519PrivateData - - RemoteCC: - - */ + // TESTNET: + inline static constexpr auto CC_PUBLISH_INTERVAL{5min}; /** ClientContact On the wire we encode the data as a dict containing: diff --git a/llarp/dht/node.hpp b/llarp/dht/node.hpp index 2326d15cff..4c9804c8b0 100644 --- a/llarp/dht/node.hpp +++ b/llarp/dht/node.hpp @@ -32,7 +32,7 @@ namespace llarp::dht CCNode(EncryptedClientContact other) : client_contact{std::move(other)}, ID{client_contact.blinded_pubkey} {} - nlohmann::json ExtractStatus() const { return nlohmann::json{{"key", client_contact.key()}}; } + nlohmann::json ExtractStatus() const { return nlohmann::json{{"key", client_contact.key().to_string()}}; } bool operator<(const CCNode& other) const { return client_contact.signed_at < other.client_contact.signed_at; } }; diff --git a/llarp/handlers/session.cpp b/llarp/handlers/session.cpp index d8a153e5cb..3c60e99e2c 100644 --- a/llarp/handlers/session.cpp +++ b/llarp/handlers/session.cpp @@ -140,7 +140,7 @@ namespace llarp::handlers { log::debug(logcat, "Starting ClientContact publish ticker..."); _cc_publisher = _router.loop()->call_every( - path::DEFAULT_LIFETIME, + CC_PUBLISH_INTERVAL, [this]() { log::info(logcat, "Updating and publishing ClientContact..."); update_and_publish_localcc(get_current_client_intros());