aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2023-08-11 16:12:42 -0600
committerfanquake <fanquake@gmail.com>2024-05-22 09:49:00 +0100
commit9cdb9edfb8d1a4b0c1ba39cea0d5cee2e28e1d31 (patch)
tree06d763125221244006e73a72d2c5b6581ae2068f
parent3c26058da223b873094b62c30f2463ab0e629b6a (diff)
p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo()
Addnode (manual) peers connected to us via the cjdns network are currently not detected by CConnman::GetAddedNodeInfo(), i.e. fConnected is always false. This causes the following issues: - RPC `getaddednodeinfo` incorrectly shows them as not connected - CConnman::ThreadOpenAddedConnections() continually retries to connect them Github-Pull: #30085 Rebased-From: 684da9707040ce25d95b2954eda50b811136d92c
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 7c82f01d75..5213cff139 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2795,7 +2795,7 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo(bool include_connected) co
}
for (const auto& addr : lAddresses) {
- CService service(LookupNumeric(addr.m_added_node, GetDefaultPort(addr.m_added_node)));
+ CService service{MaybeFlipIPv6toCJDNS(LookupNumeric(addr.m_added_node, GetDefaultPort(addr.m_added_node)))};
AddedNodeInfo addedNode{addr, CService(), false, false};
if (service.IsValid()) {
// strAddNode is an IP:port