{"action":"created","comment":{"url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/comments/245077210","pull_request_review_id":189112288,"id":245077210,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTA3NzIxMA==","diff_hunk":"@@ -40,27 +40,25 @@ def __init__(self, client, testing=0, chains=None, watchdog=0):\n                 for f in files:\n                     self.artifacts.append(os.path.join(root, f))\n \n-    async def next_bounty(self, chain):\n-        \"\"\"Submit either the EICAR test string or a benign sample\n+    async def generate_bounties(self, chain):\n+        \"\"\"Submit bounty from the filesystem\n \n         Args:\n             chain (str): Chain sample is being requested from\n-        Returns:\n-            (int, str, int): Tuple of amount, ipfs_uri, duration, None to terminate submission\n-\n-        Note:\n-            | The meaning of the return types are as follows:\n-            |   - **amount** (*int*): Amount to place this bounty for\n-            |   - **ipfs_uri** (*str*): IPFS URI of the artifact to post\n-            |   - **duration** (*int*): Duration of the bounty in blocks\n         \"\"\"\n         amount = self.client.bounties.parameters[chain]['bounty_amount_minimum']\n-        filename = random.choice(self.artifacts)\n-        duration = BOUNTY_TEST_DURATION_BLOCKS\n \n-        logger.info('Submitting file %s', filename)\n-        ipfs_uri = await self.client.post_artifacts([(filename, None)])\n-        if not ipfs_uri:\n-            raise NextBountyError('Could not submit artifact to IPFS')\n+        while True:\n+            try:\n+                filename = random.choice(self.artifacts)","path":"src/ambassador/filesystem.py","position":39,"original_position":39,"commit_id":"a4bb8a6b7626e263192c62ff483f92bc50ae67d4","original_commit_id":"a4bb8a6b7626e263192c62ff483f92bc50ae67d4","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Standard pseudo-random generators are not suitable for security/cryptographic purposes.","created_at":"2019-01-03T17:41:13Z","updated_at":"2019-01-03T17:41:13Z","html_url":"https://github.com/polyswarm/polyswarm-client/pull/150#discussion_r245077210","pull_request_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/comments/245077210"},"html":{"href":"https://github.com/polyswarm/polyswarm-client/pull/150#discussion_r245077210"},"pull_request":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150","id":242063538,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMDYzNTM4","html_url":"https://github.com/polyswarm/polyswarm-client/pull/150","diff_url":"https://github.com/polyswarm/polyswarm-client/pull/150.diff","patch_url":"https://github.com/polyswarm/polyswarm-client/pull/150.patch","issue_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/150","number":150,"state":"open","locked":false,"title":"WIP: Submit bounties via a queue with backpressure","user":{"login":"mjkoo","id":30420,"node_id":"MDQ6VXNlcjMwNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/30420?v=4","gravatar_id":"","url":"https://api.github.com/users/mjkoo","html_url":"https://github.com/mjkoo","followers_url":"https://api.github.com/users/mjkoo/followers","following_url":"https://api.github.com/users/mjkoo/following{/other_user}","gists_url":"https://api.github.com/users/mjkoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkoo/subscriptions","organizations_url":"https://api.github.com/users/mjkoo/orgs","repos_url":"https://api.github.com/users/mjkoo/repos","events_url":"https://api.github.com/users/mjkoo/events{/privacy}","received_events_url":"https://api.github.com/users/mjkoo/received_events","type":"User","site_admin":false},"body":"Simplifies logic in consumer and no longer awaits all txs to be mined before submitting additional ansactions.","created_at":"2019-01-03T17:40:35Z","updated_at":"2019-01-03T17:41:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bf46be78aa397b27469cbaece65ff198b070e10","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150/commits","review_comments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150/comments","review_comment_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/150/comments","statuses_url":"https://api.github.com/repos/polyswarm/polyswarm-client/statuses/a4bb8a6b7626e263192c62ff483f92bc50ae67d4","head":{"label":"polyswarm:feature/ambassador-refactor","ref":"feature/ambassador-refactor","sha":"a4bb8a6b7626e263192c62ff483f92bc50ae67d4","user":{"login":"polyswarm","id":31043802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMDQzODAy","avatar_url":"https://avatars0.githubusercontent.com/u/31043802?v=4","gravatar_id":"","url":"https://api.github.com/users/polyswarm","html_url":"https://github.com/polyswarm","followers_url":"https://api.github.com/users/polyswarm/followers","following_url":"https://api.github.com/users/polyswarm/following{/other_user}","gists_url":"https://api.github.com/users/polyswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/polyswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyswarm/subscriptions","organizations_url":"https://api.github.com/users/polyswarm/orgs","repos_url":"https://api.github.com/users/polyswarm/repos","events_url":"https://api.github.com/users/polyswarm/events{/privacy}","received_events_url":"https://api.github.com/users/polyswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":146795597,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY3OTU1OTc=","name":"polyswarm-client","full_name":"polyswarm/polyswarm-client","private":false,"owner":{"login":"polyswarm","id":31043802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMDQzODAy","avatar_url":"https://avatars0.githubusercontent.com/u/31043802?v=4","gravatar_id":"","url":"https://api.github.com/users/polyswarm","html_url":"https://github.com/polyswarm","followers_url":"https://api.github.com/users/polyswarm/followers","following_url":"https://api.github.com/users/polyswarm/following{/other_user}","gists_url":"https://api.github.com/users/polyswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/polyswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyswarm/subscriptions","organizations_url":"https://api.github.com/users/polyswarm/orgs","repos_url":"https://api.github.com/users/polyswarm/repos","events_url":"https://api.github.com/users/polyswarm/events{/privacy}","received_events_url":"https://api.github.com/users/polyswarm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/polyswarm/polyswarm-client","description":"Client library & drivers for interacting with polyswarmd","fork":false,"url":"https://api.github.com/repos/polyswarm/polyswarm-client","forks_url":"https://api.github.com/repos/polyswarm/polyswarm-client/forks","keys_url":"https://api.github.com/repos/polyswarm/polyswarm-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polyswarm/polyswarm-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polyswarm/polyswarm-client/teams","hooks_url":"https://api.github.com/repos/polyswarm/polyswarm-client/hooks","issue_events_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/events{/number}","events_url":"https://api.github.com/repos/polyswarm/polyswarm-client/events","assignees_url":"https://api.github.com/repos/polyswarm/polyswarm-client/assignees{/user}","branches_url":"https://api.github.com/repos/polyswarm/polyswarm-client/branches{/branch}","tags_url":"https://api.github.com/repos/polyswarm/polyswarm-client/tags","blobs_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polyswarm/polyswarm-client/statuses/{sha}","languages_url":"https://api.github.com/repos/polyswarm/polyswarm-client/languages","stargazers_url":"https://api.github.com/repos/polyswarm/polyswarm-client/stargazers","contributors_url":"https://api.github.com/repos/polyswarm/polyswarm-client/contributors","subscribers_url":"https://api.github.com/repos/polyswarm/polyswarm-client/subscribers","subscription_url":"https://api.github.com/repos/polyswarm/polyswarm-client/subscription","commits_url":"https://api.github.com/repos/polyswarm/polyswarm-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/polyswarm/polyswarm-client/contents/{+path}","compare_url":"https://api.github.com/repos/polyswarm/polyswarm-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polyswarm/polyswarm-client/merges","archive_url":"https://api.github.com/repos/polyswarm/polyswarm-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polyswarm/polyswarm-client/downloads","issues_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues{/number}","pulls_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls{/number}","milestones_url":"https://api.github.com/repos/polyswarm/polyswarm-client/milestones{/number}","notifications_url":"https://api.github.com/repos/polyswarm/polyswarm-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polyswarm/polyswarm-client/labels{/name}","releases_url":"https://api.github.com/repos/polyswarm/polyswarm-client/releases{/id}","deployments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/deployments","created_at":"2018-08-30T19:14:10Z","updated_at":"2019-01-03T15:21:20Z","pushed_at":"2019-01-03T17:40:35Z","git_url":"git://github.com/polyswarm/polyswarm-client.git","ssh_url":"git@github.com:polyswarm/polyswarm-client.git","clone_url":"https://github.com/polyswarm/polyswarm-client.git","svn_url":"https://github.com/polyswarm/polyswarm-client","homepage":"https://polyswarm.io","size":5891,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":27,"watchers":7,"default_branch":"master"}},"base":{"label":"polyswarm:master","ref":"master","sha":"4b66d5603af6e25a048109dd2a695a4695021877","user":{"login":"polyswarm","id":31043802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMDQzODAy","avatar_url":"https://avatars0.githubusercontent.com/u/31043802?v=4","gravatar_id":"","url":"https://api.github.com/users/polyswarm","html_url":"https://github.com/polyswarm","followers_url":"https://api.github.com/users/polyswarm/followers","following_url":"https://api.github.com/users/polyswarm/following{/other_user}","gists_url":"https://api.github.com/users/polyswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/polyswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyswarm/subscriptions","organizations_url":"https://api.github.com/users/polyswarm/orgs","repos_url":"https://api.github.com/users/polyswarm/repos","events_url":"https://api.github.com/users/polyswarm/events{/privacy}","received_events_url":"https://api.github.com/users/polyswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":146795597,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY3OTU1OTc=","name":"polyswarm-client","full_name":"polyswarm/polyswarm-client","private":false,"owner":{"login":"polyswarm","id":31043802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMDQzODAy","avatar_url":"https://avatars0.githubusercontent.com/u/31043802?v=4","gravatar_id":"","url":"https://api.github.com/users/polyswarm","html_url":"https://github.com/polyswarm","followers_url":"https://api.github.com/users/polyswarm/followers","following_url":"https://api.github.com/users/polyswarm/following{/other_user}","gists_url":"https://api.github.com/users/polyswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/polyswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyswarm/subscriptions","organizations_url":"https://api.github.com/users/polyswarm/orgs","repos_url":"https://api.github.com/users/polyswarm/repos","events_url":"https://api.github.com/users/polyswarm/events{/privacy}","received_events_url":"https://api.github.com/users/polyswarm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/polyswarm/polyswarm-client","description":"Client library & drivers for interacting with polyswarmd","fork":false,"url":"https://api.github.com/repos/polyswarm/polyswarm-client","forks_url":"https://api.github.com/repos/polyswarm/polyswarm-client/forks","keys_url":"https://api.github.com/repos/polyswarm/polyswarm-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polyswarm/polyswarm-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polyswarm/polyswarm-client/teams","hooks_url":"https://api.github.com/repos/polyswarm/polyswarm-client/hooks","issue_events_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/events{/number}","events_url":"https://api.github.com/repos/polyswarm/polyswarm-client/events","assignees_url":"https://api.github.com/repos/polyswarm/polyswarm-client/assignees{/user}","branches_url":"https://api.github.com/repos/polyswarm/polyswarm-client/branches{/branch}","tags_url":"https://api.github.com/repos/polyswarm/polyswarm-client/tags","blobs_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polyswarm/polyswarm-client/statuses/{sha}","languages_url":"https://api.github.com/repos/polyswarm/polyswarm-client/languages","stargazers_url":"https://api.github.com/repos/polyswarm/polyswarm-client/stargazers","contributors_url":"https://api.github.com/repos/polyswarm/polyswarm-client/contributors","subscribers_url":"https://api.github.com/repos/polyswarm/polyswarm-client/subscribers","subscription_url":"https://api.github.com/repos/polyswarm/polyswarm-client/subscription","commits_url":"https://api.github.com/repos/polyswarm/polyswarm-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/polyswarm/polyswarm-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/polyswarm/polyswarm-client/contents/{+path}","compare_url":"https://api.github.com/repos/polyswarm/polyswarm-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polyswarm/polyswarm-client/merges","archive_url":"https://api.github.com/repos/polyswarm/polyswarm-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polyswarm/polyswarm-client/downloads","issues_url":"https://api.github.com/repos/polyswarm/polyswarm-client/issues{/number}","pulls_url":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls{/number}","milestones_url":"https://api.github.com/repos/polyswarm/polyswarm-client/milestones{/number}","notifications_url":"https://api.github.com/repos/polyswarm/polyswarm-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polyswarm/polyswarm-client/labels{/name}","releases_url":"https://api.github.com/repos/polyswarm/polyswarm-client/releases{/id}","deployments_url":"https://api.github.com/repos/polyswarm/polyswarm-client/deployments","created_at":"2018-08-30T19:14:10Z","updated_at":"2019-01-03T15:21:20Z","pushed_at":"2019-01-03T17:40:35Z","git_url":"git://github.com/polyswarm/polyswarm-client.git","ssh_url":"git@github.com:polyswarm/polyswarm-client.git","clone_url":"https://github.com/polyswarm/polyswarm-client.git","svn_url":"https://github.com/polyswarm/polyswarm-client","homepage":"https://polyswarm.io","size":5891,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":27,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150"},"html":{"href":"https://github.com/polyswarm/polyswarm-client/pull/150"},"issue":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/150"},"comments":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/polyswarm/polyswarm-client/statuses/a4bb8a6b7626e263192c62ff483f92bc50ae67d4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codeclimate"}}