{"action":"created","comment":{"url":"https://api.github.com/repos/Tribler/tribler/pulls/comments/31901197","id":31901197,"diff_hunk":"@@ -257,25 +257,26 @@ def dht_callback(info_hash, peers, _):\n \n                     self.create_key_request(info_hash, peer)\n \n-        self._logger.debug(\"Doing dht lookup for hidden community\")\n+        self._logger.error(\"Doing dht lookup for hidden community\")\n         self.last_dht_lookup[info_hash] = time.time()\n         self.dht_lookup(info_hash, dht_callback)\n \n     def create_key_request(self, info_hash, sock_addr):\n-        # 1. Select a circuit\n-        self._logger.debug(\"Create key request: select circuit\")\n-        circuit = self.selection_strategy.select(None, self.hops[info_hash])\n-        if not circuit:\n-            self._logger.error(\"No circuit for key-request\")\n-            return False\n-\n-        # 2. Send a key-request message\n-        self._logger.debug(\"Create key request: send key request\")\n-        cache = self.request_cache.add(KeyRequestCache(self, circuit, sock_addr, info_hash))\n-        meta = self.get_meta_message(u'key-request')\n-        message = meta.impl(distribution=(self.global_time,), payload=(cache.number, info_hash))\n-        circuit.tunnel_data(sock_addr, TUNNEL_PREFIX + message.packet)\n-        return True\n+\n+        def callback(circuit):\n+            # Send a key-request message\n+            self._logger.error(\"Create key request: send key request\")\n+            cache = self.request_cache.add(KeyRequestCache(self, circuit, sock_addr, info_hash))\n+            meta = self.get_meta_message(u'key-request')\n+            message = meta.impl(distribution=(self.global_time,), payload=(cache.number, info_hash))\n+            circuit.tunnel_data(sock_addr, TUNNEL_PREFIX + message.packet)\n+\n+        # Create a circuit for getting the keys\n+        self._logger.error(\"Create key request: create a circuit\")\n+        self.create_circuit(self.hops[info_hash],","path":"Tribler/community/tunnel/hidden_community.py","position":90,"original_position":90,"commit_id":"8a8b2fab0f62e30a16992a75f83eaa3f1bbd910e","original_commit_id":"8a8b2fab0f62e30a16992a75f83eaa3f1bbd910e","user":{"login":"NielsZeilemaker","id":3777585,"avatar_url":"https://avatars.githubusercontent.com/u/3777585?v=3","gravatar_id":"","url":"https://api.github.com/users/NielsZeilemaker","html_url":"https://github.com/NielsZeilemaker","followers_url":"https://api.github.com/users/NielsZeilemaker/followers","following_url":"https://api.github.com/users/NielsZeilemaker/following{/other_user}","gists_url":"https://api.github.com/users/NielsZeilemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/NielsZeilemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NielsZeilemaker/subscriptions","organizations_url":"https://api.github.com/users/NielsZeilemaker/orgs","repos_url":"https://api.github.com/users/NielsZeilemaker/repos","events_url":"https://api.github.com/users/NielsZeilemaker/events{/privacy}","received_events_url":"https://api.github.com/users/NielsZeilemaker/received_events","type":"User","site_admin":false},"body":"So, you would rather use a new circuit (which takes several messages to construct, has a chance to fail etc.) than an existing one (which might be a bit overkill, due to having an actual exit_node), to send a single request/response.","created_at":"2015-06-08T10:14:01Z","updated_at":"2015-06-08T10:14:01Z","html_url":"https://github.com/Tribler/tribler/pull/1458#discussion_r31901197","pull_request_url":"https://api.github.com/repos/Tribler/tribler/pulls/1458","_links":{"self":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/comments/31901197"},"html":{"href":"https://github.com/Tribler/tribler/pull/1458#discussion_r31901197"},"pull_request":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/1458"}}},"pull_request":{"url":"https://api.github.com/repos/Tribler/tribler/pulls/1458","id":37045130,"html_url":"https://github.com/Tribler/tribler/pull/1458","diff_url":"https://github.com/Tribler/tribler/pull/1458.diff","patch_url":"https://github.com/Tribler/tribler/pull/1458.patch","issue_url":"https://api.github.com/repos/Tribler/tribler/issues/1458","number":1458,"state":"open","locked":false,"title":"WIP - Circuits for hidden services don't need to be exit enabled circuits","user":{"login":"rjruigrok","id":3985534,"avatar_url":"https://avatars.githubusercontent.com/u/3985534?v=3","gravatar_id":"","url":"https://api.github.com/users/rjruigrok","html_url":"https://github.com/rjruigrok","followers_url":"https://api.github.com/users/rjruigrok/followers","following_url":"https://api.github.com/users/rjruigrok/following{/other_user}","gists_url":"https://api.github.com/users/rjruigrok/gists{/gist_id}","starred_url":"https://api.github.com/users/rjruigrok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjruigrok/subscriptions","organizations_url":"https://api.github.com/users/rjruigrok/orgs","repos_url":"https://api.github.com/users/rjruigrok/repos","events_url":"https://api.github.com/users/rjruigrok/events{/privacy}","received_events_url":"https://api.github.com/users/rjruigrok/received_events","type":"User","site_admin":false},"body":"This PR incorporates the following changes:\r\n* Add captions to tunnel tests, see #1456.\r\n* Sets the amount of exit-enabled hops for the hidden services test to 0.\r\n* Hidden services related circuits should not require any exit-enabled circuit at all. \r\n* Only the `CIRCUIT_TYPE_DATA` circuits will look for available exit nodes, they will be only used for downloading over proxies. All other circuit types get a connectable hop as the endpoint. \r\n* Renaming `required_exit` to `required_endpoint`, it would be confusing because circuits may have exits that are not considered exit node. \r\n\r\nDON'T MERGE","created_at":"2015-06-05T16:01:28Z","updated_at":"2015-06-08T10:14:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fd0f7f96ff02dc5b3a1a09142b411cfcb5c6a37","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Tribler/tribler/pulls/1458/commits","review_comments_url":"https://api.github.com/repos/Tribler/tribler/pulls/1458/comments","review_comment_url":"https://api.github.com/repos/Tribler/tribler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tribler/tribler/issues/1458/comments","statuses_url":"https://api.github.com/repos/Tribler/tribler/statuses/8a8b2fab0f62e30a16992a75f83eaa3f1bbd910e","head":{"label":"rjruigrok:dont-refuse-dispersy","ref":"dont-refuse-dispersy","sha":"8a8b2fab0f62e30a16992a75f83eaa3f1bbd910e","user":{"login":"rjruigrok","id":3985534,"avatar_url":"https://avatars.githubusercontent.com/u/3985534?v=3","gravatar_id":"","url":"https://api.github.com/users/rjruigrok","html_url":"https://github.com/rjruigrok","followers_url":"https://api.github.com/users/rjruigrok/followers","following_url":"https://api.github.com/users/rjruigrok/following{/other_user}","gists_url":"https://api.github.com/users/rjruigrok/gists{/gist_id}","starred_url":"https://api.github.com/users/rjruigrok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjruigrok/subscriptions","organizations_url":"https://api.github.com/users/rjruigrok/orgs","repos_url":"https://api.github.com/users/rjruigrok/repos","events_url":"https://api.github.com/users/rjruigrok/events{/privacy}","received_events_url":"https://api.github.com/users/rjruigrok/received_events","type":"User","site_admin":false},"repo":{"id":22440393,"name":"tribler","full_name":"rjruigrok/tribler","owner":{"login":"rjruigrok","id":3985534,"avatar_url":"https://avatars.githubusercontent.com/u/3985534?v=3","gravatar_id":"","url":"https://api.github.com/users/rjruigrok","html_url":"https://github.com/rjruigrok","followers_url":"https://api.github.com/users/rjruigrok/followers","following_url":"https://api.github.com/users/rjruigrok/following{/other_user}","gists_url":"https://api.github.com/users/rjruigrok/gists{/gist_id}","starred_url":"https://api.github.com/users/rjruigrok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjruigrok/subscriptions","organizations_url":"https://api.github.com/users/rjruigrok/orgs","repos_url":"https://api.github.com/users/rjruigrok/repos","events_url":"https://api.github.com/users/rjruigrok/events{/privacy}","received_events_url":"https://api.github.com/users/rjruigrok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjruigrok/tribler","description":"A different BitTorrent client.","fork":true,"url":"https://api.github.com/repos/rjruigrok/tribler","forks_url":"https://api.github.com/repos/rjruigrok/tribler/forks","keys_url":"https://api.github.com/repos/rjruigrok/tribler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjruigrok/tribler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjruigrok/tribler/teams","hooks_url":"https://api.github.com/repos/rjruigrok/tribler/hooks","issue_events_url":"https://api.github.com/repos/rjruigrok/tribler/issues/events{/number}","events_url":"https://api.github.com/repos/rjruigrok/tribler/events","assignees_url":"https://api.github.com/repos/rjruigrok/tribler/assignees{/user}","branches_url":"https://api.github.com/repos/rjruigrok/tribler/branches{/branch}","tags_url":"https://api.github.com/repos/rjruigrok/tribler/tags","blobs_url":"https://api.github.com/repos/rjruigrok/tribler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjruigrok/tribler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjruigrok/tribler/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjruigrok/tribler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjruigrok/tribler/statuses/{sha}","languages_url":"https://api.github.com/repos/rjruigrok/tribler/languages","stargazers_url":"https://api.github.com/repos/rjruigrok/tribler/stargazers","contributors_url":"https://api.github.com/repos/rjruigrok/tribler/contributors","subscribers_url":"https://api.github.com/repos/rjruigrok/tribler/subscribers","subscription_url":"https://api.github.com/repos/rjruigrok/tribler/subscription","commits_url":"https://api.github.com/repos/rjruigrok/tribler/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjruigrok/tribler/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjruigrok/tribler/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjruigrok/tribler/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjruigrok/tribler/contents/{+path}","compare_url":"https://api.github.com/repos/rjruigrok/tribler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjruigrok/tribler/merges","archive_url":"https://api.github.com/repos/rjruigrok/tribler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjruigrok/tribler/downloads","issues_url":"https://api.github.com/repos/rjruigrok/tribler/issues{/number}","pulls_url":"https://api.github.com/repos/rjruigrok/tribler/pulls{/number}","milestones_url":"https://api.github.com/repos/rjruigrok/tribler/milestones{/number}","notifications_url":"https://api.github.com/repos/rjruigrok/tribler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjruigrok/tribler/labels{/name}","releases_url":"https://api.github.com/repos/rjruigrok/tribler/releases{/id}","created_at":"2014-07-30T18:43:39Z","updated_at":"2014-07-30T18:58:58Z","pushed_at":"2015-06-07T23:04:42Z","git_url":"git://github.com/rjruigrok/tribler.git","ssh_url":"git@github.com:rjruigrok/tribler.git","clone_url":"https://github.com/rjruigrok/tribler.git","svn_url":"https://github.com/rjruigrok/tribler","homepage":"http://www.tribler.org","size":108362,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"Tribler:devel","ref":"devel","sha":"5b296fdf49c9de4e92f77f533ac781a865cc73c6","user":{"login":"Tribler","id":2913489,"avatar_url":"https://avatars.githubusercontent.com/u/2913489?v=3","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"repo":{"id":8411137,"name":"tribler","full_name":"Tribler/tribler","owner":{"login":"Tribler","id":2913489,"avatar_url":"https://avatars.githubusercontent.com/u/2913489?v=3","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tribler/tribler","description":"Privacy with BitTorrent and resilient to shut down","fork":false,"url":"https://api.github.com/repos/Tribler/tribler","forks_url":"https://api.github.com/repos/Tribler/tribler/forks","keys_url":"https://api.github.com/repos/Tribler/tribler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tribler/tribler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tribler/tribler/teams","hooks_url":"https://api.github.com/repos/Tribler/tribler/hooks","issue_events_url":"https://api.github.com/repos/Tribler/tribler/issues/events{/number}","events_url":"https://api.github.com/repos/Tribler/tribler/events","assignees_url":"https://api.github.com/repos/Tribler/tribler/assignees{/user}","branches_url":"https://api.github.com/repos/Tribler/tribler/branches{/branch}","tags_url":"https://api.github.com/repos/Tribler/tribler/tags","blobs_url":"https://api.github.com/repos/Tribler/tribler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tribler/tribler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tribler/tribler/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tribler/tribler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tribler/tribler/statuses/{sha}","languages_url":"https://api.github.com/repos/Tribler/tribler/languages","stargazers_url":"https://api.github.com/repos/Tribler/tribler/stargazers","contributors_url":"https://api.github.com/repos/Tribler/tribler/contributors","subscribers_url":"https://api.github.com/repos/Tribler/tribler/subscribers","subscription_url":"https://api.github.com/repos/Tribler/tribler/subscription","commits_url":"https://api.github.com/repos/Tribler/tribler/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tribler/tribler/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tribler/tribler/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tribler/tribler/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tribler/tribler/contents/{+path}","compare_url":"https://api.github.com/repos/Tribler/tribler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tribler/tribler/merges","archive_url":"https://api.github.com/repos/Tribler/tribler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tribler/tribler/downloads","issues_url":"https://api.github.com/repos/Tribler/tribler/issues{/number}","pulls_url":"https://api.github.com/repos/Tribler/tribler/pulls{/number}","milestones_url":"https://api.github.com/repos/Tribler/tribler/milestones{/number}","notifications_url":"https://api.github.com/repos/Tribler/tribler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tribler/tribler/labels{/name}","releases_url":"https://api.github.com/repos/Tribler/tribler/releases{/id}","created_at":"2013-02-25T14:51:58Z","updated_at":"2015-06-06T19:21:53Z","pushed_at":"2015-06-07T23:04:42Z","git_url":"git://github.com/Tribler/tribler.git","ssh_url":"git@github.com:Tribler/tribler.git","clone_url":"https://github.com/Tribler/tribler.git","svn_url":"https://github.com/Tribler/tribler","homepage":"http://www.tribler.org","size":121031,"stargazers_count":1640,"watchers_count":1640,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":144,"mirror_url":null,"open_issues_count":138,"forks":144,"open_issues":138,"watchers":1640,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/1458"},"html":{"href":"https://github.com/Tribler/tribler/pull/1458"},"issue":{"href":"https://api.github.com/repos/Tribler/tribler/issues/1458"},"comments":{"href":"https://api.github.com/repos/Tribler/tribler/issues/1458/comments"},"review_comments":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/1458/comments"},"review_comment":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tribler/tribler/pulls/1458/commits"},"statuses":{"href":"https://api.github.com/repos/Tribler/tribler/statuses/8a8b2fab0f62e30a16992a75f83eaa3f1bbd910e"}}}}