{"action":"created","comment":{"url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/comments/177157916","pull_request_review_id":106982972,"id":177157916,"diff_hunk":"@@ -114,41 +155,68 @@ def _get_attempt_list(self) -> str:\n         trigger_currency = flask_module.request.args.get('trigger_currency')  # type: Optional[str]\n         trigger_receiver = flask_module.request.args.get('trigger_receiver')  # type: Optional[str]\n         anything = flask_module.request.args.get('anything')  # type: Optional[str]\n+        attempt = flask_module.request.args.get('attempt')  # type: Optional[int]\n+        tries = flask_module.request.args.get('tries')  # type: Optional[int]\n \n         trigger_receiver_as_int = None  # type: Optional[int]\n \n         if trigger_receiver is not None:\n             trigger_receiver_as_int = int(trigger_receiver)\n \n-        if (trigger_tx is None) and (anything is None):\n+        if (trigger_tx is None) and (anything is None) and (attempt is None) and (tries is None):\n             return flask_module.abort(400)\n \n         query = AttemptListQuery(\n             trigger_currency=trigger_currency,\n             trigger_tx=trigger_tx,\n             trigger_receiver=trigger_receiver_as_int,\n-            anything=anything)\n+            anything=anything,\n+            attempt=attempt,\n+            tries=tries)\n \n         attempt_lists = self._gateway_controller.query_attempt_lists(query)\n \n         serialized_lists = map_array(lambda x: self._serializer.attempt_list_as_dict(x), attempt_lists)\n \n         return flask_module.jsonify(serialized_lists)\n \n-    def _check_coin_transaction(self, tx: str) -> str:\n-        try:\n-            self._gateway_controller.check_coin_transaction(tx)\n-        except InvalidTransactionIdentifier:\n-            flask_module.abort(400)\n-        except NotImplementedError:\n-            flask_module.abort(501)\n+    def _check_coin_transaction(self, tx: str):\n+        key = flask_module.request.headers['api-key']\n+\n+        if key == self._key:\n+            try:\n+                self._gateway_controller.check_coin_transaction(tx)\n+            except InvalidTransactionIdentifier:\n+                flask_module.abort(400)\n+            except NotImplementedError:\n+                flask_module.abort(501)\n \n-        return ''\n+            return ''\n+        else:\n+            flask_module.abort(403)\n \n-    def _check_waves_transaction(self, tx: str) -> str:\n-        try:\n-            self._gateway_controller.check_waves_transaction(tx)\n-        except InvalidTransactionIdentifier:\n-            flask_module.abort(400)\n+    def _get_block_heights(self):\n+        heights = self._gateway_controller.get_block_heights()\n+        print(heights)","path":"waves_gateway/controller/flask_rest_controller.py","position":123,"original_position":123,"commit_id":"134840593714d3a1dd228ca3dec7eff9658b449b","original_commit_id":"134840593714d3a1dd228ca3dec7eff9658b449b","user":{"login":"henning96","id":9799593,"avatar_url":"https://avatars0.githubusercontent.com/u/9799593?v=4","gravatar_id":"","url":"https://api.github.com/users/henning96","html_url":"https://github.com/henning96","followers_url":"https://api.github.com/users/henning96/followers","following_url":"https://api.github.com/users/henning96/following{/other_user}","gists_url":"https://api.github.com/users/henning96/gists{/gist_id}","starred_url":"https://api.github.com/users/henning96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henning96/subscriptions","organizations_url":"https://api.github.com/users/henning96/orgs","repos_url":"https://api.github.com/users/henning96/repos","events_url":"https://api.github.com/users/henning96/events{/privacy}","received_events_url":"https://api.github.com/users/henning96/received_events","type":"User","site_admin":false},"body":"Remove","created_at":"2018-03-26T16:40:27Z","updated_at":"2018-03-26T16:40:27Z","html_url":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4#discussion_r177157916","pull_request_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/comments/177157916"},"html":{"href":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4#discussion_r177157916"},"pull_request":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4","id":177497186,"html_url":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4","diff_url":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4.diff","patch_url":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4.patch","issue_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/4","number":4,"state":"open","locked":false,"title":"Extension and adjustments for support applications","user":{"login":"henning96","id":9799593,"avatar_url":"https://avatars0.githubusercontent.com/u/9799593?v=4","gravatar_id":"","url":"https://api.github.com/users/henning96","html_url":"https://github.com/henning96","followers_url":"https://api.github.com/users/henning96/followers","following_url":"https://api.github.com/users/henning96/following{/other_user}","gists_url":"https://api.github.com/users/henning96/gists{/gist_id}","starred_url":"https://api.github.com/users/henning96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henning96/subscriptions","organizations_url":"https://api.github.com/users/henning96/orgs","repos_url":"https://api.github.com/users/henning96/repos","events_url":"https://api.github.com/users/henning96/events{/privacy}","received_events_url":"https://api.github.com/users/henning96/received_events","type":"User","site_admin":false},"body":"add loghandler (for support logs)\r\nadd automatic back transfer (when amount is big enough)\r\nadd functionality to trigger an attempt list retry\r\nadd functionality for storing not processable transactions\r\nadd rest endpoints (not processable attemptlists and transactions, support logs, current processed block heights and average attemptlist tries)\r\nadd api key\r\nfix old and add new tests","created_at":"2018-03-26T16:16:48Z","updated_at":"2018-03-26T16:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a79bd526f205ae78d9cb782ac49a811492cda49","assignee":{"login":"henning96","id":9799593,"avatar_url":"https://avatars0.githubusercontent.com/u/9799593?v=4","gravatar_id":"","url":"https://api.github.com/users/henning96","html_url":"https://github.com/henning96","followers_url":"https://api.github.com/users/henning96/followers","following_url":"https://api.github.com/users/henning96/following{/other_user}","gists_url":"https://api.github.com/users/henning96/gists{/gist_id}","starred_url":"https://api.github.com/users/henning96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henning96/subscriptions","organizations_url":"https://api.github.com/users/henning96/orgs","repos_url":"https://api.github.com/users/henning96/repos","events_url":"https://api.github.com/users/henning96/events{/privacy}","received_events_url":"https://api.github.com/users/henning96/received_events","type":"User","site_admin":false},"assignees":[{"login":"henning96","id":9799593,"avatar_url":"https://avatars0.githubusercontent.com/u/9799593?v=4","gravatar_id":"","url":"https://api.github.com/users/henning96","html_url":"https://github.com/henning96","followers_url":"https://api.github.com/users/henning96/followers","following_url":"https://api.github.com/users/henning96/following{/other_user}","gists_url":"https://api.github.com/users/henning96/gists{/gist_id}","starred_url":"https://api.github.com/users/henning96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henning96/subscriptions","organizations_url":"https://api.github.com/users/henning96/orgs","repos_url":"https://api.github.com/users/henning96/repos","events_url":"https://api.github.com/users/henning96/events{/privacy}","received_events_url":"https://api.github.com/users/henning96/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/4/comments","statuses_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/statuses/134840593714d3a1dd228ca3dec7eff9658b449b","head":{"label":"htatjana:add_api_key_rebased","ref":"add_api_key_rebased","sha":"134840593714d3a1dd228ca3dec7eff9658b449b","user":{"login":"htatjana","id":24715775,"avatar_url":"https://avatars1.githubusercontent.com/u/24715775?v=4","gravatar_id":"","url":"https://api.github.com/users/htatjana","html_url":"https://github.com/htatjana","followers_url":"https://api.github.com/users/htatjana/followers","following_url":"https://api.github.com/users/htatjana/following{/other_user}","gists_url":"https://api.github.com/users/htatjana/gists{/gist_id}","starred_url":"https://api.github.com/users/htatjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htatjana/subscriptions","organizations_url":"https://api.github.com/users/htatjana/orgs","repos_url":"https://api.github.com/users/htatjana/repos","events_url":"https://api.github.com/users/htatjana/events{/privacy}","received_events_url":"https://api.github.com/users/htatjana/received_events","type":"User","site_admin":false},"repo":{"id":126683874,"name":"WavesGatewayFramework","full_name":"htatjana/WavesGatewayFramework","owner":{"login":"htatjana","id":24715775,"avatar_url":"https://avatars1.githubusercontent.com/u/24715775?v=4","gravatar_id":"","url":"https://api.github.com/users/htatjana","html_url":"https://github.com/htatjana","followers_url":"https://api.github.com/users/htatjana/followers","following_url":"https://api.github.com/users/htatjana/following{/other_user}","gists_url":"https://api.github.com/users/htatjana/gists{/gist_id}","starred_url":"https://api.github.com/users/htatjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htatjana/subscriptions","organizations_url":"https://api.github.com/users/htatjana/orgs","repos_url":"https://api.github.com/users/htatjana/repos","events_url":"https://api.github.com/users/htatjana/events{/privacy}","received_events_url":"https://api.github.com/users/htatjana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/htatjana/WavesGatewayFramework","description":"A framework to connect other cryptocurrencies to the Waves platform.","fork":true,"url":"https://api.github.com/repos/htatjana/WavesGatewayFramework","forks_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/forks","keys_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/teams","hooks_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/hooks","issue_events_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/issues/events{/number}","events_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/events","assignees_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/assignees{/user}","branches_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/branches{/branch}","tags_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/tags","blobs_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/languages","stargazers_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/stargazers","contributors_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/contributors","subscribers_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/subscribers","subscription_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/subscription","commits_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/issues/comments{/number}","contents_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/contents/{+path}","compare_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/merges","archive_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/downloads","issues_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/issues{/number}","pulls_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/labels{/name}","releases_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/releases{/id}","deployments_url":"https://api.github.com/repos/htatjana/WavesGatewayFramework/deployments","created_at":"2018-03-25T09:52:24Z","updated_at":"2018-03-25T09:52:26Z","pushed_at":"2018-03-26T16:23:11Z","git_url":"git://github.com/htatjana/WavesGatewayFramework.git","ssh_url":"git@github.com:htatjana/WavesGatewayFramework.git","clone_url":"https://github.com/htatjana/WavesGatewayFramework.git","svn_url":"https://github.com/htatjana/WavesGatewayFramework","homepage":null,"size":1345,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jansenmarc:master","ref":"master","sha":"b664aa73a6d37571bfe2050f30215a2b1abd492a","user":{"login":"jansenmarc","id":9219148,"avatar_url":"https://avatars0.githubusercontent.com/u/9219148?v=4","gravatar_id":"","url":"https://api.github.com/users/jansenmarc","html_url":"https://github.com/jansenmarc","followers_url":"https://api.github.com/users/jansenmarc/followers","following_url":"https://api.github.com/users/jansenmarc/following{/other_user}","gists_url":"https://api.github.com/users/jansenmarc/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenmarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenmarc/subscriptions","organizations_url":"https://api.github.com/users/jansenmarc/orgs","repos_url":"https://api.github.com/users/jansenmarc/repos","events_url":"https://api.github.com/users/jansenmarc/events{/privacy}","received_events_url":"https://api.github.com/users/jansenmarc/received_events","type":"User","site_admin":false},"repo":{"id":123681045,"name":"WavesGatewayFramework","full_name":"jansenmarc/WavesGatewayFramework","owner":{"login":"jansenmarc","id":9219148,"avatar_url":"https://avatars0.githubusercontent.com/u/9219148?v=4","gravatar_id":"","url":"https://api.github.com/users/jansenmarc","html_url":"https://github.com/jansenmarc","followers_url":"https://api.github.com/users/jansenmarc/followers","following_url":"https://api.github.com/users/jansenmarc/following{/other_user}","gists_url":"https://api.github.com/users/jansenmarc/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenmarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenmarc/subscriptions","organizations_url":"https://api.github.com/users/jansenmarc/orgs","repos_url":"https://api.github.com/users/jansenmarc/repos","events_url":"https://api.github.com/users/jansenmarc/events{/privacy}","received_events_url":"https://api.github.com/users/jansenmarc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jansenmarc/WavesGatewayFramework","description":"A framework to connect other cryptocurrencies to the Waves platform.","fork":false,"url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework","forks_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/forks","keys_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/teams","hooks_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/hooks","issue_events_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/events{/number}","events_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/events","assignees_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/assignees{/user}","branches_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/branches{/branch}","tags_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/tags","blobs_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/languages","stargazers_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/stargazers","contributors_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/contributors","subscribers_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/subscribers","subscription_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/subscription","commits_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/comments{/number}","contents_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/contents/{+path}","compare_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/merges","archive_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/downloads","issues_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues{/number}","pulls_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/labels{/name}","releases_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/releases{/id}","deployments_url":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/deployments","created_at":"2018-03-03T10:14:55Z","updated_at":"2018-03-04T11:08:41Z","pushed_at":"2018-03-26T16:23:12Z","git_url":"git://github.com/jansenmarc/WavesGatewayFramework.git","ssh_url":"git@github.com:jansenmarc/WavesGatewayFramework.git","clone_url":"https://github.com/jansenmarc/WavesGatewayFramework.git","svn_url":"https://github.com/jansenmarc/WavesGatewayFramework","homepage":null,"size":729,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4"},"html":{"href":"https://github.com/jansenmarc/WavesGatewayFramework/pull/4"},"issue":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/4"},"comments":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jansenmarc/WavesGatewayFramework/statuses/134840593714d3a1dd228ca3dec7eff9658b449b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"henning96"}}