aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-12-04 12:51:45 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-01-26 18:37:26 +0000
commit5f98b46d58e37dfe409578d48e15966acf7c4560 (patch)
treed321deaec481e5efbc6f1de80ba72fc028d0bd4d /src/p2p
parentMerge pull request #6093 (diff)
downloadmonero-5f98b46d58e37dfe409578d48e15966acf7c4560.tar.xz
p2p: remove obsolete local time from TIMED_SYNC
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.h2
-rw-r--r--src/p2p/net_node.inl8
-rw-r--r--src/p2p/p2p_protocol_defs.h2
3 files changed, 4 insertions, 8 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 0e9c1c942..1ef6b9028 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -362,7 +362,7 @@ namespace nodetool
const boost::program_options::variables_map& vm
);
bool idle_worker();
- bool handle_remote_peerlist(const std::vector<peerlist_entry>& peerlist, time_t local_time, const epee::net_utils::connection_context_base& context);
+ bool handle_remote_peerlist(const std::vector<peerlist_entry>& peerlist, const epee::net_utils::connection_context_base& context);
bool get_local_node_data(basic_node_data& node_data, const network_zone& zone);
//bool get_local_handshake_data(handshake_data& hshd);
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 263cecfa2..7a2feddc8 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1041,7 +1041,7 @@ namespace nodetool
return;
}
- if(!handle_remote_peerlist(rsp.local_peerlist_new, rsp.node_data.local_time, context))
+ if(!handle_remote_peerlist(rsp.local_peerlist_new, context))
{
LOG_WARNING_CC(context, "COMMAND_HANDSHAKE: failed to handle_remote_peerlist(...), closing connection.");
add_host_fail(context.m_remote_address);
@@ -1119,7 +1119,7 @@ namespace nodetool
return;
}
- if(!handle_remote_peerlist(rsp.local_peerlist_new, rsp.local_time, context))
+ if(!handle_remote_peerlist(rsp.local_peerlist_new, context))
{
LOG_WARNING_CC(context, "COMMAND_TIMED_SYNC: failed to handle_remote_peerlist(...), closing connection.");
m_network_zones.at(context.m_remote_address.get_zone()).m_net_server.get_config_object().close(context.m_connection_id );
@@ -1894,7 +1894,7 @@ namespace nodetool
}
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>
- bool node_server<t_payload_net_handler>::handle_remote_peerlist(const std::vector<peerlist_entry>& peerlist, time_t local_time, const epee::net_utils::connection_context_base& context)
+ bool node_server<t_payload_net_handler>::handle_remote_peerlist(const std::vector<peerlist_entry>& peerlist, const epee::net_utils::connection_context_base& context)
{
std::vector<peerlist_entry> peerlist_ = peerlist;
if(!sanitize_peerlist(peerlist_))
@@ -2291,8 +2291,6 @@ namespace nodetool
}
//fill response
- rsp.local_time = time(NULL);
-
const epee::net_utils::zone zone_type = context.m_remote_address.get_zone();
network_zone& zone = m_network_zones.at(zone_type);
diff --git a/src/p2p/p2p_protocol_defs.h b/src/p2p/p2p_protocol_defs.h
index 44b278589..178382547 100644
--- a/src/p2p/p2p_protocol_defs.h
+++ b/src/p2p/p2p_protocol_defs.h
@@ -268,12 +268,10 @@ namespace nodetool
struct response_t
{
- uint64_t local_time;
t_playload_type payload_data;
std::vector<peerlist_entry> local_peerlist_new;
BEGIN_KV_SERIALIZE_MAP()
- KV_SERIALIZE(local_time)
KV_SERIALIZE(payload_data)
if (is_store)
{