aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
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/net_node.inl
parentMerge pull request #6093 (diff)
downloadmonero-5f98b46d58e37dfe409578d48e15966acf7c4560.tar.xz
p2p: remove obsolete local time from TIMED_SYNC
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl8
1 files changed, 3 insertions, 5 deletions
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);