From bf85a69a2f216f4486b66010a86af950bc0d2f86 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 26 Jan 2025 17:49:24 -0500 Subject: [PATCH] min peer test version 0.9.62 --- libi2pd/NetDb.hpp | 1 + libi2pd/RouterInfo.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/libi2pd/NetDb.hpp b/libi2pd/NetDb.hpp index 75169862..f2a7019b 100644 --- a/libi2pd/NetDb.hpp +++ b/libi2pd/NetDb.hpp @@ -53,6 +53,7 @@ namespace data const int NETDB_MIN_HIGHBANDWIDTH_VERSION = MAKE_VERSION_NUMBER(0, 9, 58); // 0.9.58 const int NETDB_MIN_FLOODFILL_VERSION = MAKE_VERSION_NUMBER(0, 9, 59); // 0.9.59 const int NETDB_MIN_SHORT_TUNNEL_BUILD_VERSION = MAKE_VERSION_NUMBER(0, 9, 51); // 0.9.51 + const int NETDB_MIN_PEER_TEST_VERSION = MAKE_VERSION_NUMBER(0, 9, 62); // 0.9.62 const size_t NETDB_MAX_NUM_SEARCH_REPLY_PEER_HASHES = 16; const size_t NETDB_MAX_EXPLORATORY_SELECTION_SIZE = 500; const int NETDB_EXPLORATORY_SELECTION_UPDATE_INTERVAL = 82; // in seconds. for floodfill diff --git a/libi2pd/RouterInfo.cpp b/libi2pd/RouterInfo.cpp index 63961bca..9cad82ab 100644 --- a/libi2pd/RouterInfo.cpp +++ b/libi2pd/RouterInfo.cpp @@ -486,6 +486,15 @@ namespace data } ch++; } + if (m_Version < NETDB_MIN_PEER_TEST_VERSION && (m_SupportedTransports & (eSSU2V4 | eSSU2V6))) + { + auto addresses = GetAddresses (); + if (addresses) + { + if ((*addresses)[eSSU2V4Idx]) (*addresses)[eSSU2V4Idx]->caps &= ~eSSUTesting; + if ((*addresses)[eSSU2V6Idx]) (*addresses)[eSSU2V6Idx]->caps &= ~eSSUTesting; + } + } } // check netId else if (!strcmp (key, ROUTER_INFO_PROPERTY_NETID))