{"action":"created","comment":{"url":"https://api.github.com/repos/monero-project/monero/pulls/comments/245474349","pull_request_review_id":189593623,"id":245474349,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ3NDM0OQ==","diff_hunk":"@@ -1488,57 +1646,59 @@ namespace nodetool\n       return true;\n     });\n \n-    m_peerlist.get_peerlist_full(rsp.local_peerlist_gray, rsp.local_peerlist_white);\n-    rsp.my_id = m_config.m_peer_id;\n+    network_zone& zone = m_network_zones.at(context.m_remote_address.get_zone());\n+    zone.m_peerlist.get_peerlist(rsp.local_peerlist_gray, rsp.local_peerlist_white);\n+    rsp.my_id = zone.m_config.m_peer_id;\n     rsp.local_time = time(NULL);\n     return 1;\n   }\n   //-----------------------------------------------------------------------------------\n   template<class t_payload_net_handler>\n   int node_server<t_payload_net_handler>::handle_get_peer_id(int command, COMMAND_REQUEST_PEER_ID::request& arg, COMMAND_REQUEST_PEER_ID::response& rsp, p2p_connection_context& context)\n   {\n-    rsp.my_id = m_config.m_peer_id;\n+    rsp.my_id = m_network_zones.at(context.m_remote_address.get_zone()).m_config.m_peer_id;\n     return 1;\n   }\n #endif\n   //-----------------------------------------------------------------------------------\n   template<class t_payload_net_handler>\n   int node_server<t_payload_net_handler>::handle_get_support_flags(int command, COMMAND_REQUEST_SUPPORT_FLAGS::request& arg, COMMAND_REQUEST_SUPPORT_FLAGS::response& rsp, p2p_connection_context& context)\n   {\n-    rsp.support_flags = m_config.m_support_flags;\n+    rsp.support_flags = m_network_zones.at(context.m_remote_address.get_zone()).m_config.m_support_flags;\n     return 1;\n   }\n   //-----------------------------------------------------------------------------------\n   template<class t_payload_net_handler>\n   void node_server<t_payload_net_handler>::request_callback(const epee::net_utils::connection_context_base& context)\n   {\n-    m_net_server.get_config_object().request_callback(context.m_connection_id);\n+    m_network_zones.at(context.m_remote_address.get_zone()).m_net_server.get_config_object().request_callback(context.m_connection_id);\n   }\n   //-----------------------------------------------------------------------------------\n   template<class t_payload_net_handler>\n-  bool node_server<t_payload_net_handler>::relay_notify_to_list(int command, const std::string& data_buff, const std::list<boost::uuids::uuid> &connections)\n+  bool node_server<t_payload_net_handler>::relay_notify_to_list(int command, const std::string& data_buff, std::vector<std::pair<epee::net_utils::zone, boost::uuids::uuid>> connections)\n   {\n+    std::sort(connections.begin(), connections.end());\n+    auto zone = m_network_zones.begin();\n     for(const auto& c_id: connections)\n     {\n-      m_net_server.get_config_object().notify(command, data_buff, c_id);\n+      for (;;)\n+      {\n+        if (zone == m_network_zones.end())\n+        {\n+           MWARNING(\"Unable to relay all messages, \" << epee::net_utils::zone_to_string(c_id.first) << \" not available\");\n+           return false;\n+        }\n+        if (c_id.first == zone->first)\n+          break;\n+\n+        ++zone;\n+      }\n+      zone->second.m_net_server.get_config_object().notify(command, data_buff, c_id.second);","path":"src/p2p/net_node.inl","position":1413,"original_position":1413,"commit_id":"0ef9bb5ddac87a048ac03a30143186454d4cd746","original_commit_id":"0ef9bb5ddac87a048ac03a30143186454d4cd746","user":{"login":"moneromooo-monero","id":8851073,"node_id":"MDQ6VXNlcjg4NTEwNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8851073?v=4","gravatar_id":"","url":"https://api.github.com/users/moneromooo-monero","html_url":"https://github.com/moneromooo-monero","followers_url":"https://api.github.com/users/moneromooo-monero/followers","following_url":"https://api.github.com/users/moneromooo-monero/following{/other_user}","gists_url":"https://api.github.com/users/moneromooo-monero/gists{/gist_id}","starred_url":"https://api.github.com/users/moneromooo-monero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneromooo-monero/subscriptions","organizations_url":"https://api.github.com/users/moneromooo-monero/orgs","repos_url":"https://api.github.com/users/moneromooo-monero/repos","events_url":"https://api.github.com/users/moneromooo-monero/events{/privacy}","received_events_url":"https://api.github.com/users/moneromooo-monero/received_events","type":"User","site_admin":false},"body":"What is the intent of that sorting ? It seems like it's not needed at first glance.","created_at":"2019-01-05T10:57:31Z","updated_at":"2019-01-05T10:57:31Z","html_url":"https://github.com/monero-project/monero/pull/4988#discussion_r245474349","pull_request_url":"https://api.github.com/repos/monero-project/monero/pulls/4988","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/monero-project/monero/pulls/comments/245474349"},"html":{"href":"https://github.com/monero-project/monero/pull/4988#discussion_r245474349"},"pull_request":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4988"}}},"pull_request":{"url":"https://api.github.com/repos/monero-project/monero/pulls/4988","id":238997840,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTk3ODQw","html_url":"https://github.com/monero-project/monero/pull/4988","diff_url":"https://github.com/monero-project/monero/pull/4988.diff","patch_url":"https://github.com/monero-project/monero/pull/4988.patch","issue_url":"https://api.github.com/repos/monero-project/monero/issues/4988","number":4988,"state":"open","locked":false,"title":"Adding initial support for broadcasting transactions over Tor","user":{"login":"vtnerd","id":6564514,"node_id":"MDQ6VXNlcjY1NjQ1MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6564514?v=4","gravatar_id":"","url":"https://api.github.com/users/vtnerd","html_url":"https://github.com/vtnerd","followers_url":"https://api.github.com/users/vtnerd/followers","following_url":"https://api.github.com/users/vtnerd/following{/other_user}","gists_url":"https://api.github.com/users/vtnerd/gists{/gist_id}","starred_url":"https://api.github.com/users/vtnerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtnerd/subscriptions","organizations_url":"https://api.github.com/users/vtnerd/orgs","repos_url":"https://api.github.com/users/vtnerd/repos","events_url":"https://api.github.com/users/vtnerd/events{/privacy}","received_events_url":"https://api.github.com/users/vtnerd/received_events","type":"User","site_admin":false},"body":"  - Support for \".onion\" in --add-exclusive-node and --add-peer\r\n  - Add --anonymizing-proxy for outbound Tor connections\r\n  - Add --anonymous-inbounds for inbound Tor connections\r\n  - Support for sharing \".onion\" addresses over Tor connections\r\n  - Support for broadcasting transactions received over RPC exclusively\r\n    over Tor (else broadcast over public IP when Tor not enabled).","created_at":"2018-12-16T23:23:34Z","updated_at":"2019-01-05T10:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"032d6b692483a6666221e50ea0bae5a67f8f44d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/monero-project/monero/pulls/4988/commits","review_comments_url":"https://api.github.com/repos/monero-project/monero/pulls/4988/comments","review_comment_url":"https://api.github.com/repos/monero-project/monero/pulls/comments{/number}","comments_url":"https://api.github.com/repos/monero-project/monero/issues/4988/comments","statuses_url":"https://api.github.com/repos/monero-project/monero/statuses/0ef9bb5ddac87a048ac03a30143186454d4cd746","head":{"label":"vtnerd:feature/tor_initial","ref":"feature/tor_initial","sha":"0ef9bb5ddac87a048ac03a30143186454d4cd746","user":{"login":"vtnerd","id":6564514,"node_id":"MDQ6VXNlcjY1NjQ1MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6564514?v=4","gravatar_id":"","url":"https://api.github.com/users/vtnerd","html_url":"https://github.com/vtnerd","followers_url":"https://api.github.com/users/vtnerd/followers","following_url":"https://api.github.com/users/vtnerd/following{/other_user}","gists_url":"https://api.github.com/users/vtnerd/gists{/gist_id}","starred_url":"https://api.github.com/users/vtnerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtnerd/subscriptions","organizations_url":"https://api.github.com/users/vtnerd/orgs","repos_url":"https://api.github.com/users/vtnerd/repos","events_url":"https://api.github.com/users/vtnerd/events{/privacy}","received_events_url":"https://api.github.com/users/vtnerd/received_events","type":"User","site_admin":false},"repo":{"id":72460633,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ2MDYzMw==","name":"monero","full_name":"vtnerd/monero","private":false,"owner":{"login":"vtnerd","id":6564514,"node_id":"MDQ6VXNlcjY1NjQ1MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6564514?v=4","gravatar_id":"","url":"https://api.github.com/users/vtnerd","html_url":"https://github.com/vtnerd","followers_url":"https://api.github.com/users/vtnerd/followers","following_url":"https://api.github.com/users/vtnerd/following{/other_user}","gists_url":"https://api.github.com/users/vtnerd/gists{/gist_id}","starred_url":"https://api.github.com/users/vtnerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtnerd/subscriptions","organizations_url":"https://api.github.com/users/vtnerd/orgs","repos_url":"https://api.github.com/users/vtnerd/repos","events_url":"https://api.github.com/users/vtnerd/events{/privacy}","received_events_url":"https://api.github.com/users/vtnerd/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vtnerd/monero","description":"Monero: the secure, private, untraceable cryptocurrency","fork":true,"url":"https://api.github.com/repos/vtnerd/monero","forks_url":"https://api.github.com/repos/vtnerd/monero/forks","keys_url":"https://api.github.com/repos/vtnerd/monero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtnerd/monero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtnerd/monero/teams","hooks_url":"https://api.github.com/repos/vtnerd/monero/hooks","issue_events_url":"https://api.github.com/repos/vtnerd/monero/issues/events{/number}","events_url":"https://api.github.com/repos/vtnerd/monero/events","assignees_url":"https://api.github.com/repos/vtnerd/monero/assignees{/user}","branches_url":"https://api.github.com/repos/vtnerd/monero/branches{/branch}","tags_url":"https://api.github.com/repos/vtnerd/monero/tags","blobs_url":"https://api.github.com/repos/vtnerd/monero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtnerd/monero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtnerd/monero/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtnerd/monero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtnerd/monero/statuses/{sha}","languages_url":"https://api.github.com/repos/vtnerd/monero/languages","stargazers_url":"https://api.github.com/repos/vtnerd/monero/stargazers","contributors_url":"https://api.github.com/repos/vtnerd/monero/contributors","subscribers_url":"https://api.github.com/repos/vtnerd/monero/subscribers","subscription_url":"https://api.github.com/repos/vtnerd/monero/subscription","commits_url":"https://api.github.com/repos/vtnerd/monero/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtnerd/monero/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtnerd/monero/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtnerd/monero/issues/comments{/number}","contents_url":"https://api.github.com/repos/vtnerd/monero/contents/{+path}","compare_url":"https://api.github.com/repos/vtnerd/monero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtnerd/monero/merges","archive_url":"https://api.github.com/repos/vtnerd/monero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtnerd/monero/downloads","issues_url":"https://api.github.com/repos/vtnerd/monero/issues{/number}","pulls_url":"https://api.github.com/repos/vtnerd/monero/pulls{/number}","milestones_url":"https://api.github.com/repos/vtnerd/monero/milestones{/number}","notifications_url":"https://api.github.com/repos/vtnerd/monero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtnerd/monero/labels{/name}","releases_url":"https://api.github.com/repos/vtnerd/monero/releases{/id}","deployments_url":"https://api.github.com/repos/vtnerd/monero/deployments","created_at":"2016-10-31T17:27:13Z","updated_at":"2018-07-27T03:33:16Z","pushed_at":"2019-01-03T07:44:08Z","git_url":"git://github.com/vtnerd/monero.git","ssh_url":"git@github.com:vtnerd/monero.git","clone_url":"https://github.com/vtnerd/monero.git","svn_url":"https://github.com/vtnerd/monero","homepage":"https://getmonero.org","size":148739,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"monero-project:master","ref":"master","sha":"e344d93ce706482fc55bb036051dc08da18fabbb","user":{"login":"monero-project","id":7450663,"node_id":"MDQ6VXNlcjc0NTA2NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/7450663?v=4","gravatar_id":"","url":"https://api.github.com/users/monero-project","html_url":"https://github.com/monero-project","followers_url":"https://api.github.com/users/monero-project/followers","following_url":"https://api.github.com/users/monero-project/following{/other_user}","gists_url":"https://api.github.com/users/monero-project/gists{/gist_id}","starred_url":"https://api.github.com/users/monero-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monero-project/subscriptions","organizations_url":"https://api.github.com/users/monero-project/orgs","repos_url":"https://api.github.com/users/monero-project/repos","events_url":"https://api.github.com/users/monero-project/events{/privacy}","received_events_url":"https://api.github.com/users/monero-project/received_events","type":"User","site_admin":false},"repo":{"id":19316619,"node_id":"MDEwOlJlcG9zaXRvcnkxOTMxNjYxOQ==","name":"monero","full_name":"monero-project/monero","private":false,"owner":{"login":"monero-project","id":7450663,"node_id":"MDQ6VXNlcjc0NTA2NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/7450663?v=4","gravatar_id":"","url":"https://api.github.com/users/monero-project","html_url":"https://github.com/monero-project","followers_url":"https://api.github.com/users/monero-project/followers","following_url":"https://api.github.com/users/monero-project/following{/other_user}","gists_url":"https://api.github.com/users/monero-project/gists{/gist_id}","starred_url":"https://api.github.com/users/monero-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monero-project/subscriptions","organizations_url":"https://api.github.com/users/monero-project/orgs","repos_url":"https://api.github.com/users/monero-project/repos","events_url":"https://api.github.com/users/monero-project/events{/privacy}","received_events_url":"https://api.github.com/users/monero-project/received_events","type":"User","site_admin":false},"html_url":"https://github.com/monero-project/monero","description":"Monero: the secure, private, untraceable cryptocurrency","fork":false,"url":"https://api.github.com/repos/monero-project/monero","forks_url":"https://api.github.com/repos/monero-project/monero/forks","keys_url":"https://api.github.com/repos/monero-project/monero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monero-project/monero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monero-project/monero/teams","hooks_url":"https://api.github.com/repos/monero-project/monero/hooks","issue_events_url":"https://api.github.com/repos/monero-project/monero/issues/events{/number}","events_url":"https://api.github.com/repos/monero-project/monero/events","assignees_url":"https://api.github.com/repos/monero-project/monero/assignees{/user}","branches_url":"https://api.github.com/repos/monero-project/monero/branches{/branch}","tags_url":"https://api.github.com/repos/monero-project/monero/tags","blobs_url":"https://api.github.com/repos/monero-project/monero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monero-project/monero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monero-project/monero/git/refs{/sha}","trees_url":"https://api.github.com/repos/monero-project/monero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monero-project/monero/statuses/{sha}","languages_url":"https://api.github.com/repos/monero-project/monero/languages","stargazers_url":"https://api.github.com/repos/monero-project/monero/stargazers","contributors_url":"https://api.github.com/repos/monero-project/monero/contributors","subscribers_url":"https://api.github.com/repos/monero-project/monero/subscribers","subscription_url":"https://api.github.com/repos/monero-project/monero/subscription","commits_url":"https://api.github.com/repos/monero-project/monero/commits{/sha}","git_commits_url":"https://api.github.com/repos/monero-project/monero/git/commits{/sha}","comments_url":"https://api.github.com/repos/monero-project/monero/comments{/number}","issue_comment_url":"https://api.github.com/repos/monero-project/monero/issues/comments{/number}","contents_url":"https://api.github.com/repos/monero-project/monero/contents/{+path}","compare_url":"https://api.github.com/repos/monero-project/monero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monero-project/monero/merges","archive_url":"https://api.github.com/repos/monero-project/monero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monero-project/monero/downloads","issues_url":"https://api.github.com/repos/monero-project/monero/issues{/number}","pulls_url":"https://api.github.com/repos/monero-project/monero/pulls{/number}","milestones_url":"https://api.github.com/repos/monero-project/monero/milestones{/number}","notifications_url":"https://api.github.com/repos/monero-project/monero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monero-project/monero/labels{/name}","releases_url":"https://api.github.com/repos/monero-project/monero/releases{/id}","deployments_url":"https://api.github.com/repos/monero-project/monero/deployments","created_at":"2014-04-30T14:38:28Z","updated_at":"2019-01-05T10:08:11Z","pushed_at":"2019-01-04T16:48:10Z","git_url":"git://github.com/monero-project/monero.git","ssh_url":"git@github.com:monero-project/monero.git","clone_url":"https://github.com/monero-project/monero.git","svn_url":"https://github.com/monero-project/monero","homepage":"https://getmonero.org","size":148778,"stargazers_count":3552,"watchers_count":3552,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1848,"mirror_url":null,"archived":false,"open_issues_count":304,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1848,"open_issues":304,"watchers":3552,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4988"},"html":{"href":"https://github.com/monero-project/monero/pull/4988"},"issue":{"href":"https://api.github.com/repos/monero-project/monero/issues/4988"},"comments":{"href":"https://api.github.com/repos/monero-project/monero/issues/4988/comments"},"review_comments":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4988/comments"},"review_comment":{"href":"https://api.github.com/repos/monero-project/monero/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4988/commits"},"statuses":{"href":"https://api.github.com/repos/monero-project/monero/statuses/0ef9bb5ddac87a048ac03a30143186454d4cd746"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"moneromooo-monero"}}