aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-03-09 13:32:22 -0400
committerluigi1111 <luigi1111w@gmail.com>2020-03-09 13:32:22 -0400
commit137a11b39c690ba5ee2d5f0af318ba9cc10fe8ac (patch)
treeab1f836b9b79020494d5179204843bb0bc30d2e3
parentMerge pull request #6368 (diff)
parentp2p: plug tor to clearnet association vector (diff)
downloadmonero-137a11b39c690ba5ee2d5f0af318ba9cc10fe8ac.tar.xz
Merge pull request #6373
62ab7fd p2p: plug tor to clearnet association vector (moneromooo-monero)
-rw-r--r--src/p2p/net_node.inl14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index f8094bfa8..316ed1586 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1058,17 +1058,15 @@ namespace nodetool
pi = context.peer_id = rsp.node_data.peer_id;
context.m_rpc_port = rsp.node_data.rpc_port;
context.m_rpc_credits_per_hash = rsp.node_data.rpc_credits_per_hash;
- m_network_zones.at(context.m_remote_address.get_zone()).m_peerlist.set_peer_just_seen(rsp.node_data.peer_id, context.m_remote_address, context.m_pruning_seed, context.m_rpc_port, context.m_rpc_credits_per_hash);
+ network_zone& zone = m_network_zones.at(context.m_remote_address.get_zone());
+ zone.m_peerlist.set_peer_just_seen(rsp.node_data.peer_id, context.m_remote_address, context.m_pruning_seed, context.m_rpc_port, context.m_rpc_credits_per_hash);
// move
- for (auto const& zone : m_network_zones)
+ if(rsp.node_data.peer_id == zone.m_config.m_peer_id)
{
- if(rsp.node_data.peer_id == zone.second.m_config.m_peer_id)
- {
- LOG_DEBUG_CC(context, "Connection to self detected, dropping connection");
- hsh_result = false;
- return;
- }
+ LOG_DEBUG_CC(context, "Connection to self detected, dropping connection");
+ hsh_result = false;
+ return;
}
LOG_INFO_CC(context, "New connection handshaked, pruning seed " << epee::string_tools::to_string_hex(context.m_pruning_seed));
LOG_DEBUG_CC(context, " COMMAND_HANDSHAKE INVOKED OK");