diff options
author | Jon Atack <jon@atack.com> | 2023-08-11 16:12:42 -0600 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2024-05-23 17:05:57 +0100 |
commit | 21d9aaae3226d76094d323c1de8e1470c5384622 (patch) | |
tree | 14e5aaa719fe4614be8e9c40172a6d62c298324c | |
parent | ec5ce2fb2b34cdf9691557121faa69298daa97f2 (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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 5305e1148a..36a8964bb6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2794,7 +2794,7 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo() const } 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 |