Skip to content

Commit

Permalink
p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo()
Browse files Browse the repository at this point in the history
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: bitcoin#30085
Rebased-From: 684da97
  • Loading branch information
jonatack authored and fanquake committed May 22, 2024
1 parent 3c26058 commit 9cdb9ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cdb9ed

Please sign in to comment.