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

Method add_node

libraries/net/node.cpp:4544–4557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4542 }
4543
4544 void node_impl::add_node(const fc::ip::endpoint& ep)
4545 {
4546 VERIFY_CORRECT_THREAD();
4547 // if we're connecting to them, we believe they're not firewalled
4548 potential_peer_record updated_peer_record = _potential_peer_db.lookup_or_create_entry_for_endpoint(ep);
4549
4550 // if we've recently connected to this peer, reset the last_connection_attempt_time to allow
4551 // us to immediately retry this peer
4552 updated_peer_record.last_connection_attempt_time = std::min<fc::time_point_sec>(updated_peer_record.last_connection_attempt_time,
4553 fc::time_point::now() - fc::seconds(_peer_connection_retry_timeout));
4554 _add_once_node_list.push_back(updated_peer_record);
4555 _potential_peer_db.update_entry(updated_peer_record);
4556 trigger_p2p_network_connect_loop();
4557 }
4558
4559 void node_impl::initiate_connect_to(const peer_connection_ptr& new_peer)
4560 {

Callers

nothing calls this directly

Calls 3

nowFunction · 0.85
update_entryMethod · 0.80

Tested by

no test coverage detected