net/rpc: Makes CConnman::GetAddedNodeInfo able to return only non-connected address on request

`CConnman::GetAddedNodeInfo` is used both to get a list of addresses to manually connect to
in `CConnman::ThreadOpenAddedConnections`, and to report about manually added connections in
`getaddednodeinfo`. In both cases, all addresses added to `m_added_nodes` are returned, however
the nodes we are already connected to are only relevant to the latter, in the former they are
actively discarded.

Parametrizes `CConnman::GetAddedNodeInfo` so we can ask for only addresses we are not connected to,
to avoid passing useless information around.
This commit is contained in:
Sergi Delgado Segura
2023-07-25 15:47:36 -04:00
parent 94e8882d82
commit 34b9ef443b
4 changed files with 20 additions and 16 deletions

View File

@@ -121,7 +121,7 @@ FUZZ_TARGET(connman, .init = initialize_connman)
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
});
}
(void)connman.GetAddedNodeInfo();
(void)connman.GetAddedNodeInfo(fuzzed_data_provider.ConsumeBool());
(void)connman.GetExtraFullOutboundCount();
(void)connman.GetLocalServices();
(void)connman.GetMaxOutboundTarget();