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
  • Loading branch information
jonatack committed May 11, 2024
1 parent 2cedb42 commit 684da97
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 @@ -2832,7 +2832,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 684da97

Please sign in to comment.