MCPcopy Create free account
hub / github.com/bcndev/bytecoin / get_my_node_data

Method get_my_node_data

src/p2p/P2PProtocolBasic.cpp:79–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77Timestamp P2PProtocolBasic::get_local_time() const { return platform::now_unix_timestamp(); }
78
79BasicNodeData P2PProtocolBasic::get_my_node_data() const {
80 BasicNodeData node_data;
81 node_data.version = P2PProtocolVersion::AMETHYST;
82 node_data.local_time = get_local_time();
83 node_data.peer_id = my_unique_number;
84 node_data.my_port = config.p2p_external_port;
85 node_data.network_id = config.network_id;
86 return node_data;
87}
88
89void P2PProtocolBasic::on_connect() {
90 no_incoming_timer.once(float(config.p2p_no_incoming_handshake_disconnect_timeout));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected