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 glozow committed May 23, 2024
1 parent 24c282f commit a2efacb
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 @@ -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
Expand Down

0 comments on commit a2efacb

Please sign in to comment.