| 77 | Timestamp P2PProtocolBasic::get_local_time() const { return platform::now_unix_timestamp(); } |
| 78 | |
| 79 | BasicNodeData 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 | |
| 89 | void P2PProtocolBasic::on_connect() { |
| 90 | no_incoming_timer.once(float(config.p2p_no_incoming_handshake_disconnect_timeout)); |
nothing calls this directly
no outgoing calls
no test coverage detected