MCPcopy Create free account
hub / github.com/cryptonomex/graphene / get_peer_by_node_id

Method get_peer_by_node_id

libraries/net/node.cpp:1669–1678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1667 }
1668
1669 peer_connection_ptr node_impl::get_peer_by_node_id(const node_id_t& node_id)
1670 {
1671 for (const peer_connection_ptr& active_peer : _active_connections)
1672 if (node_id == active_peer->node_id)
1673 return active_peer;
1674 for (const peer_connection_ptr& handshaking_peer : _handshaking_connections)
1675 if (node_id == handshaking_peer->node_id)
1676 return handshaking_peer;
1677 return peer_connection_ptr();
1678 }
1679
1680 bool node_impl::is_already_connected_to_id(const node_id_t& node_id)
1681 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected