MCPcopy Create free account
hub / github.com/cryptonomex/graphene / ~node_impl

Method ~node_impl

libraries/net/node.cpp:831–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829 }
830
831 node_impl::~node_impl()
832 {
833 VERIFY_CORRECT_THREAD();
834 ilog( "cleaning up node" );
835 _node_is_shutting_down = true;
836
837 for (const peer_connection_ptr& active_peer : _active_connections)
838 {
839 fc::optional<fc::ip::endpoint> inbound_endpoint = active_peer->get_endpoint_for_connecting();
840 if (inbound_endpoint)
841 {
842 fc::optional<potential_peer_record> updated_peer_record = _potential_peer_db.lookup_entry_for_endpoint(*inbound_endpoint);
843 if (updated_peer_record)
844 {
845 updated_peer_record->last_seen_time = fc::time_point::now();
846 _potential_peer_db.update_entry(*updated_peer_record);
847 }
848 }
849 }
850
851 try
852 {
853 ilog( "close" );
854 close();
855 }
856 catch ( const fc::exception& e )
857 {
858 wlog( "unexpected exception on close ${e}", ("e", e) );
859 }
860 ilog( "done" );
861 }
862
863 void node_impl::save_node_configuration()
864 {

Callers

nothing calls this directly

Calls 4

nowFunction · 0.85
update_entryMethod · 0.80

Tested by

no test coverage detected