net_node

    typedef p2p_connection_context_t<typename t_payload_net_handler::connection_context> p2p_connection_context;
    typedef t_payload_net_handler payload_net_handler;
    config m_config; // TODO was private, add getters?
    std::atomic<unsigned int> m_current_number_of_out_peers;
    std::atomic<unsigned int> m_current_number_of_in_peers;
    std::string m_config_folder;

    bool m_have_address;
    bool m_first_connection_maker_call;
    uint32_t m_listening_port;
    uint32_t m_external_port;
    uint32_t m_ip_address;
    bool m_allow_local_ip;
    bool m_hide_my_port;
    bool m_no_igd;
    bool m_offline;
    std::atomic<bool> m_save_graph;
    std::atomic<bool> is_closing;
    std::unique_ptr<boost::thread> mPeersLoggerThread;
    //critical_section m_connections_lock;
    //connections_indexed_container m_connections;

    t_payload_net_handler& m_payload_handler;
    peerlist_manager m_peerlist;

    epee::math_helper::once_a_time_seconds<P2P_DEFAULT_HANDSHAKE_INTERVAL> m_peer_handshake_idle_maker_interval;
    epee::math_helper::once_a_time_seconds<1> m_connections_maker_interval;
    epee::math_helper::once_a_time_seconds<60*30, false> m_peerlist_store_interval;
    epee::math_helper::once_a_time_seconds<60> m_gray_peerlist_housekeeping_interval;
    epee::math_helper::once_a_time_seconds<900, false> m_incoming_connections_interval;

    std::string m_bind_ip;
    std::string m_port;

    uint64_t m_last_stat_request_time;

    std::list<epee::net_utils::network_address>   m_priority_peers;
    std::vector<epee::net_utils::network_address> m_exclusive_peers;
    std::vector<epee::net_utils::network_address> m_seed_nodes;
    bool m_fallback_seed_nodes_added;
    std::list<nodetool::peerlist_entry> m_command_line_peers;
    uint64_t m_peer_livetime;
    //keep connections to initiate some interactions
    net_server m_net_server;
    boost::uuids::uuid m_network_id;

    std::map<epee::net_utils::network_address, time_t> m_conn_fails_cache;
    epee::critical_section m_conn_fails_cache_lock;

    epee::critical_section m_blocked_hosts_lock;
    std::map<std::string, time_t> m_blocked_hosts;

    epee::critical_section m_host_fails_score_lock;
    std::map<std::string, uint64_t> m_host_fails_score;

    cryptonote::network_type m_nettype;

Last updated

Was this helpful?