{"action":"created","comment":{"url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/comments/215904047","pull_request_review_id":153270771,"id":215904047,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTkwNDA0Nw==","diff_hunk":"@@ -24,26 +28,27 @@ def check_same_output_in_transaction(transaction):\n         indexes.append(input_val[\"output_index\"])\n     return True\n \n-\n-\n+def is_not_same_tx(transaction):\n+    ''' Check whether transaction pool or block has the same transaction. '''\n+    block_db = BlockchainDB()\n+    json_tx = json.dumps(transaction, sort_keys = True)\n+    tx_hash = hashlib.sha256(json_tx.encode()).hexdigest()\n+    if txpool_db.search_from_txpool(tx_hash) == False:\n+        try:\n+            block_db.find_tx(tx_hash)","path":"module/check_tx_temp.py","position":23,"original_position":23,"commit_id":"356a70b12089d3cd1a3bc4532a332661041aa8cb","original_commit_id":"356a70b12089d3cd1a3bc4532a332661041aa8cb","user":{"login":"equanz","id":12148992,"node_id":"MDQ6VXNlcjEyMTQ4OTky","avatar_url":"https://avatars2.githubusercontent.com/u/12148992?v=4","gravatar_id":"","url":"https://api.github.com/users/equanz","html_url":"https://github.com/equanz","followers_url":"https://api.github.com/users/equanz/followers","following_url":"https://api.github.com/users/equanz/following{/other_user}","gists_url":"https://api.github.com/users/equanz/gists{/gist_id}","starred_url":"https://api.github.com/users/equanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equanz/subscriptions","organizations_url":"https://api.github.com/users/equanz/orgs","repos_url":"https://api.github.com/users/equanz/repos","events_url":"https://api.github.com/users/equanz/events{/privacy}","received_events_url":"https://api.github.com/users/equanz/received_events","type":"User","site_admin":false},"body":"これだとトランザクションが返ってきているか判定できていません．","created_at":"2018-09-07T09:41:41Z","updated_at":"2018-09-07T09:42:31Z","html_url":"https://github.com/equanz/mini_blockchain/pull/10#discussion_r215904047","pull_request_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/comments/215904047"},"html":{"href":"https://github.com/equanz/mini_blockchain/pull/10#discussion_r215904047"},"pull_request":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10","id":213869401,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzODY5NDAx","html_url":"https://github.com/equanz/mini_blockchain/pull/10","diff_url":"https://github.com/equanz/mini_blockchain/pull/10.diff","patch_url":"https://github.com/equanz/mini_blockchain/pull/10.patch","issue_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/10","number":10,"state":"open","locked":false,"title":"トランザクション検証の追加","user":{"login":"amataku","id":19948719,"node_id":"MDQ6VXNlcjE5OTQ4NzE5","avatar_url":"https://avatars3.githubusercontent.com/u/19948719?v=4","gravatar_id":"","url":"https://api.github.com/users/amataku","html_url":"https://github.com/amataku","followers_url":"https://api.github.com/users/amataku/followers","following_url":"https://api.github.com/users/amataku/following{/other_user}","gists_url":"https://api.github.com/users/amataku/gists{/gist_id}","starred_url":"https://api.github.com/users/amataku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amataku/subscriptions","organizations_url":"https://api.github.com/users/amataku/orgs","repos_url":"https://api.github.com/users/amataku/repos","events_url":"https://api.github.com/users/amataku/events{/privacy}","received_events_url":"https://api.github.com/users/amataku/received_events","type":"User","site_admin":false},"body":"## やったこと\r\n* トランザクションプールやブロックに同じトランザクションがないか検証\r\n\r\n## やってないこと\r\n* エラー投げる","created_at":"2018-09-07T09:30:52Z","updated_at":"2018-09-07T09:42:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"079042c13ae82e69e4e9ab0e462a0d84237b892b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10/commits","review_comments_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10/comments","review_comment_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/10/comments","statuses_url":"https://api.github.com/repos/equanz/mini_blockchain/statuses/356a70b12089d3cd1a3bc4532a332661041aa8cb","head":{"label":"equanz:check_tx","ref":"check_tx","sha":"356a70b12089d3cd1a3bc4532a332661041aa8cb","user":{"login":"equanz","id":12148992,"node_id":"MDQ6VXNlcjEyMTQ4OTky","avatar_url":"https://avatars2.githubusercontent.com/u/12148992?v=4","gravatar_id":"","url":"https://api.github.com/users/equanz","html_url":"https://github.com/equanz","followers_url":"https://api.github.com/users/equanz/followers","following_url":"https://api.github.com/users/equanz/following{/other_user}","gists_url":"https://api.github.com/users/equanz/gists{/gist_id}","starred_url":"https://api.github.com/users/equanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equanz/subscriptions","organizations_url":"https://api.github.com/users/equanz/orgs","repos_url":"https://api.github.com/users/equanz/repos","events_url":"https://api.github.com/users/equanz/events{/privacy}","received_events_url":"https://api.github.com/users/equanz/received_events","type":"User","site_admin":false},"repo":{"id":145077424,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwNzc0MjQ=","name":"mini_blockchain","full_name":"equanz/mini_blockchain","owner":{"login":"equanz","id":12148992,"node_id":"MDQ6VXNlcjEyMTQ4OTky","avatar_url":"https://avatars2.githubusercontent.com/u/12148992?v=4","gravatar_id":"","url":"https://api.github.com/users/equanz","html_url":"https://github.com/equanz","followers_url":"https://api.github.com/users/equanz/followers","following_url":"https://api.github.com/users/equanz/following{/other_user}","gists_url":"https://api.github.com/users/equanz/gists{/gist_id}","starred_url":"https://api.github.com/users/equanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equanz/subscriptions","organizations_url":"https://api.github.com/users/equanz/orgs","repos_url":"https://api.github.com/users/equanz/repos","events_url":"https://api.github.com/users/equanz/events{/privacy}","received_events_url":"https://api.github.com/users/equanz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/equanz/mini_blockchain","description":null,"fork":false,"url":"https://api.github.com/repos/equanz/mini_blockchain","forks_url":"https://api.github.com/repos/equanz/mini_blockchain/forks","keys_url":"https://api.github.com/repos/equanz/mini_blockchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equanz/mini_blockchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equanz/mini_blockchain/teams","hooks_url":"https://api.github.com/repos/equanz/mini_blockchain/hooks","issue_events_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/events{/number}","events_url":"https://api.github.com/repos/equanz/mini_blockchain/events","assignees_url":"https://api.github.com/repos/equanz/mini_blockchain/assignees{/user}","branches_url":"https://api.github.com/repos/equanz/mini_blockchain/branches{/branch}","tags_url":"https://api.github.com/repos/equanz/mini_blockchain/tags","blobs_url":"https://api.github.com/repos/equanz/mini_blockchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equanz/mini_blockchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equanz/mini_blockchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/equanz/mini_blockchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equanz/mini_blockchain/statuses/{sha}","languages_url":"https://api.github.com/repos/equanz/mini_blockchain/languages","stargazers_url":"https://api.github.com/repos/equanz/mini_blockchain/stargazers","contributors_url":"https://api.github.com/repos/equanz/mini_blockchain/contributors","subscribers_url":"https://api.github.com/repos/equanz/mini_blockchain/subscribers","subscription_url":"https://api.github.com/repos/equanz/mini_blockchain/subscription","commits_url":"https://api.github.com/repos/equanz/mini_blockchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/equanz/mini_blockchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/equanz/mini_blockchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/equanz/mini_blockchain/contents/{+path}","compare_url":"https://api.github.com/repos/equanz/mini_blockchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equanz/mini_blockchain/merges","archive_url":"https://api.github.com/repos/equanz/mini_blockchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equanz/mini_blockchain/downloads","issues_url":"https://api.github.com/repos/equanz/mini_blockchain/issues{/number}","pulls_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls{/number}","milestones_url":"https://api.github.com/repos/equanz/mini_blockchain/milestones{/number}","notifications_url":"https://api.github.com/repos/equanz/mini_blockchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equanz/mini_blockchain/labels{/name}","releases_url":"https://api.github.com/repos/equanz/mini_blockchain/releases{/id}","deployments_url":"https://api.github.com/repos/equanz/mini_blockchain/deployments","created_at":"2018-08-17T05:49:13Z","updated_at":"2018-09-07T08:51:22Z","pushed_at":"2018-09-07T09:30:52Z","git_url":"git://github.com/equanz/mini_blockchain.git","ssh_url":"git@github.com:equanz/mini_blockchain.git","clone_url":"https://github.com/equanz/mini_blockchain.git","svn_url":"https://github.com/equanz/mini_blockchain","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"equanz:master","ref":"master","sha":"70bb90630100122ca1ab0b4c5dc57da4f3a4f0a3","user":{"login":"equanz","id":12148992,"node_id":"MDQ6VXNlcjEyMTQ4OTky","avatar_url":"https://avatars2.githubusercontent.com/u/12148992?v=4","gravatar_id":"","url":"https://api.github.com/users/equanz","html_url":"https://github.com/equanz","followers_url":"https://api.github.com/users/equanz/followers","following_url":"https://api.github.com/users/equanz/following{/other_user}","gists_url":"https://api.github.com/users/equanz/gists{/gist_id}","starred_url":"https://api.github.com/users/equanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equanz/subscriptions","organizations_url":"https://api.github.com/users/equanz/orgs","repos_url":"https://api.github.com/users/equanz/repos","events_url":"https://api.github.com/users/equanz/events{/privacy}","received_events_url":"https://api.github.com/users/equanz/received_events","type":"User","site_admin":false},"repo":{"id":145077424,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwNzc0MjQ=","name":"mini_blockchain","full_name":"equanz/mini_blockchain","owner":{"login":"equanz","id":12148992,"node_id":"MDQ6VXNlcjEyMTQ4OTky","avatar_url":"https://avatars2.githubusercontent.com/u/12148992?v=4","gravatar_id":"","url":"https://api.github.com/users/equanz","html_url":"https://github.com/equanz","followers_url":"https://api.github.com/users/equanz/followers","following_url":"https://api.github.com/users/equanz/following{/other_user}","gists_url":"https://api.github.com/users/equanz/gists{/gist_id}","starred_url":"https://api.github.com/users/equanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equanz/subscriptions","organizations_url":"https://api.github.com/users/equanz/orgs","repos_url":"https://api.github.com/users/equanz/repos","events_url":"https://api.github.com/users/equanz/events{/privacy}","received_events_url":"https://api.github.com/users/equanz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/equanz/mini_blockchain","description":null,"fork":false,"url":"https://api.github.com/repos/equanz/mini_blockchain","forks_url":"https://api.github.com/repos/equanz/mini_blockchain/forks","keys_url":"https://api.github.com/repos/equanz/mini_blockchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equanz/mini_blockchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equanz/mini_blockchain/teams","hooks_url":"https://api.github.com/repos/equanz/mini_blockchain/hooks","issue_events_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/events{/number}","events_url":"https://api.github.com/repos/equanz/mini_blockchain/events","assignees_url":"https://api.github.com/repos/equanz/mini_blockchain/assignees{/user}","branches_url":"https://api.github.com/repos/equanz/mini_blockchain/branches{/branch}","tags_url":"https://api.github.com/repos/equanz/mini_blockchain/tags","blobs_url":"https://api.github.com/repos/equanz/mini_blockchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equanz/mini_blockchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equanz/mini_blockchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/equanz/mini_blockchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equanz/mini_blockchain/statuses/{sha}","languages_url":"https://api.github.com/repos/equanz/mini_blockchain/languages","stargazers_url":"https://api.github.com/repos/equanz/mini_blockchain/stargazers","contributors_url":"https://api.github.com/repos/equanz/mini_blockchain/contributors","subscribers_url":"https://api.github.com/repos/equanz/mini_blockchain/subscribers","subscription_url":"https://api.github.com/repos/equanz/mini_blockchain/subscription","commits_url":"https://api.github.com/repos/equanz/mini_blockchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/equanz/mini_blockchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/equanz/mini_blockchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/equanz/mini_blockchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/equanz/mini_blockchain/contents/{+path}","compare_url":"https://api.github.com/repos/equanz/mini_blockchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equanz/mini_blockchain/merges","archive_url":"https://api.github.com/repos/equanz/mini_blockchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equanz/mini_blockchain/downloads","issues_url":"https://api.github.com/repos/equanz/mini_blockchain/issues{/number}","pulls_url":"https://api.github.com/repos/equanz/mini_blockchain/pulls{/number}","milestones_url":"https://api.github.com/repos/equanz/mini_blockchain/milestones{/number}","notifications_url":"https://api.github.com/repos/equanz/mini_blockchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equanz/mini_blockchain/labels{/name}","releases_url":"https://api.github.com/repos/equanz/mini_blockchain/releases{/id}","deployments_url":"https://api.github.com/repos/equanz/mini_blockchain/deployments","created_at":"2018-08-17T05:49:13Z","updated_at":"2018-09-07T08:51:22Z","pushed_at":"2018-09-07T09:30:52Z","git_url":"git://github.com/equanz/mini_blockchain.git","ssh_url":"git@github.com:equanz/mini_blockchain.git","clone_url":"https://github.com/equanz/mini_blockchain.git","svn_url":"https://github.com/equanz/mini_blockchain","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10"},"html":{"href":"https://github.com/equanz/mini_blockchain/pull/10"},"issue":{"href":"https://api.github.com/repos/equanz/mini_blockchain/issues/10"},"comments":{"href":"https://api.github.com/repos/equanz/mini_blockchain/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/equanz/mini_blockchain/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/equanz/mini_blockchain/statuses/356a70b12089d3cd1a3bc4532a332661041aa8cb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"equanz"}}