{"action":"created","comment":{"url":"https://api.github.com/repos/Bytom/bytom/pulls/comments/181705349","pull_request_review_id":112378610,"id":181705349,"diff_hunk":"@@ -1,13 +1,51 @@\n package tensority\n \n-import \"github.com/bytom/protocol/bc\"\n+import (\n+\t\"github.com/golang/groupcache/lru\"\n \n-// Leave here for implement cache\n-type AIHash struct{}\n+\t\"github.com/bytom/crypto/sha3pool\"\n+\t\"github.com/bytom/protocol/bc\"\n+)\n \n-func Hash(hash, seed *bc.Hash) *bc.Hash {\n+const maxAIHashCached = 2048","path":"mining/tensority/algorithm.go","position":14,"original_position":14,"commit_id":"8fe099d1c2376adefa1abd4ae40d9aac265d53a1","original_commit_id":"8fe099d1c2376adefa1abd4ae40d9aac265d53a1","user":{"login":"Paladz","id":6713162,"avatar_url":"https://avatars0.githubusercontent.com/u/6713162?v=4","gravatar_id":"","url":"https://api.github.com/users/Paladz","html_url":"https://github.com/Paladz","followers_url":"https://api.github.com/users/Paladz/followers","following_url":"https://api.github.com/users/Paladz/following{/other_user}","gists_url":"https://api.github.com/users/Paladz/gists{/gist_id}","starred_url":"https://api.github.com/users/Paladz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paladz/subscriptions","organizations_url":"https://api.github.com/users/Paladz/orgs","repos_url":"https://api.github.com/users/Paladz/repos","events_url":"https://api.github.com/users/Paladz/events{/privacy}","received_events_url":"https://api.github.com/users/Paladz/received_events","type":"User","site_admin":false},"body":"多少个这个无所谓， 大小都是我们自己设的，你给个觉得优雅的数字，我改","created_at":"2018-04-16T11:43:22Z","updated_at":"2018-04-16T11:43:23Z","html_url":"https://github.com/Bytom/bytom/pull/635#discussion_r181705349","pull_request_url":"https://api.github.com/repos/Bytom/bytom/pulls/635","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/comments/181705349"},"html":{"href":"https://github.com/Bytom/bytom/pull/635#discussion_r181705349"},"pull_request":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/635"}},"in_reply_to_id":181702228},"pull_request":{"url":"https://api.github.com/repos/Bytom/bytom/pulls/635","id":181465361,"html_url":"https://github.com/Bytom/bytom/pull/635","diff_url":"https://github.com/Bytom/bytom/pull/635.diff","patch_url":"https://github.com/Bytom/bytom/pull/635.patch","issue_url":"https://api.github.com/repos/Bytom/bytom/issues/635","number":635,"state":"open","locked":false,"title":"add cache for tensority","user":{"login":"Paladz","id":6713162,"avatar_url":"https://avatars0.githubusercontent.com/u/6713162?v=4","gravatar_id":"","url":"https://api.github.com/users/Paladz","html_url":"https://github.com/Paladz","followers_url":"https://api.github.com/users/Paladz/followers","following_url":"https://api.github.com/users/Paladz/following{/other_user}","gists_url":"https://api.github.com/users/Paladz/gists{/gist_id}","starred_url":"https://api.github.com/users/Paladz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paladz/subscriptions","organizations_url":"https://api.github.com/users/Paladz/orgs","repos_url":"https://api.github.com/users/Paladz/repos","events_url":"https://api.github.com/users/Paladz/events{/privacy}","received_events_url":"https://api.github.com/users/Paladz/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-13T11:50:49Z","updated_at":"2018-04-16T11:43:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e13dc8aa2412fd1fbf2f2ad8b7fedffb8c7a919","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Bytom/bytom/pulls/635/commits","review_comments_url":"https://api.github.com/repos/Bytom/bytom/pulls/635/comments","review_comment_url":"https://api.github.com/repos/Bytom/bytom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Bytom/bytom/issues/635/comments","statuses_url":"https://api.github.com/repos/Bytom/bytom/statuses/8fe099d1c2376adefa1abd4ae40d9aac265d53a1","head":{"label":"Bytom:unit_test","ref":"unit_test","sha":"8fe099d1c2376adefa1abd4ae40d9aac265d53a1","user":{"login":"Bytom","id":28505705,"avatar_url":"https://avatars0.githubusercontent.com/u/28505705?v=4","gravatar_id":"","url":"https://api.github.com/users/Bytom","html_url":"https://github.com/Bytom","followers_url":"https://api.github.com/users/Bytom/followers","following_url":"https://api.github.com/users/Bytom/following{/other_user}","gists_url":"https://api.github.com/users/Bytom/gists{/gist_id}","starred_url":"https://api.github.com/users/Bytom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bytom/subscriptions","organizations_url":"https://api.github.com/users/Bytom/orgs","repos_url":"https://api.github.com/users/Bytom/repos","events_url":"https://api.github.com/users/Bytom/events{/privacy}","received_events_url":"https://api.github.com/users/Bytom/received_events","type":"Organization","site_admin":false},"repo":{"id":97181001,"name":"bytom","full_name":"Bytom/bytom","owner":{"login":"Bytom","id":28505705,"avatar_url":"https://avatars0.githubusercontent.com/u/28505705?v=4","gravatar_id":"","url":"https://api.github.com/users/Bytom","html_url":"https://github.com/Bytom","followers_url":"https://api.github.com/users/Bytom/followers","following_url":"https://api.github.com/users/Bytom/following{/other_user}","gists_url":"https://api.github.com/users/Bytom/gists{/gist_id}","starred_url":"https://api.github.com/users/Bytom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bytom/subscriptions","organizations_url":"https://api.github.com/users/Bytom/orgs","repos_url":"https://api.github.com/users/Bytom/repos","events_url":"https://api.github.com/users/Bytom/events{/privacy}","received_events_url":"https://api.github.com/users/Bytom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Bytom/bytom","description":"Official Go implementation of the Bytom protocol ","fork":false,"url":"https://api.github.com/repos/Bytom/bytom","forks_url":"https://api.github.com/repos/Bytom/bytom/forks","keys_url":"https://api.github.com/repos/Bytom/bytom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bytom/bytom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bytom/bytom/teams","hooks_url":"https://api.github.com/repos/Bytom/bytom/hooks","issue_events_url":"https://api.github.com/repos/Bytom/bytom/issues/events{/number}","events_url":"https://api.github.com/repos/Bytom/bytom/events","assignees_url":"https://api.github.com/repos/Bytom/bytom/assignees{/user}","branches_url":"https://api.github.com/repos/Bytom/bytom/branches{/branch}","tags_url":"https://api.github.com/repos/Bytom/bytom/tags","blobs_url":"https://api.github.com/repos/Bytom/bytom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bytom/bytom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bytom/bytom/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bytom/bytom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bytom/bytom/statuses/{sha}","languages_url":"https://api.github.com/repos/Bytom/bytom/languages","stargazers_url":"https://api.github.com/repos/Bytom/bytom/stargazers","contributors_url":"https://api.github.com/repos/Bytom/bytom/contributors","subscribers_url":"https://api.github.com/repos/Bytom/bytom/subscribers","subscription_url":"https://api.github.com/repos/Bytom/bytom/subscription","commits_url":"https://api.github.com/repos/Bytom/bytom/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bytom/bytom/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bytom/bytom/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bytom/bytom/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bytom/bytom/contents/{+path}","compare_url":"https://api.github.com/repos/Bytom/bytom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bytom/bytom/merges","archive_url":"https://api.github.com/repos/Bytom/bytom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bytom/bytom/downloads","issues_url":"https://api.github.com/repos/Bytom/bytom/issues{/number}","pulls_url":"https://api.github.com/repos/Bytom/bytom/pulls{/number}","milestones_url":"https://api.github.com/repos/Bytom/bytom/milestones{/number}","notifications_url":"https://api.github.com/repos/Bytom/bytom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bytom/bytom/labels{/name}","releases_url":"https://api.github.com/repos/Bytom/bytom/releases{/id}","deployments_url":"https://api.github.com/repos/Bytom/bytom/deployments","created_at":"2017-07-14T01:47:33Z","updated_at":"2018-04-16T06:39:39Z","pushed_at":"2018-04-16T11:41:52Z","git_url":"git://github.com/Bytom/bytom.git","ssh_url":"git@github.com:Bytom/bytom.git","clone_url":"https://github.com/Bytom/bytom.git","svn_url":"https://github.com/Bytom/bytom","homepage":"https://bytom.io/","size":48030,"stargazers_count":564,"watchers_count":564,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":176,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":176,"open_issues":32,"watchers":564,"default_branch":"master"}},"base":{"label":"Bytom:dev","ref":"dev","sha":"b77773335aed2e2c8f6494bc95858ddd40b45cec","user":{"login":"Bytom","id":28505705,"avatar_url":"https://avatars0.githubusercontent.com/u/28505705?v=4","gravatar_id":"","url":"https://api.github.com/users/Bytom","html_url":"https://github.com/Bytom","followers_url":"https://api.github.com/users/Bytom/followers","following_url":"https://api.github.com/users/Bytom/following{/other_user}","gists_url":"https://api.github.com/users/Bytom/gists{/gist_id}","starred_url":"https://api.github.com/users/Bytom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bytom/subscriptions","organizations_url":"https://api.github.com/users/Bytom/orgs","repos_url":"https://api.github.com/users/Bytom/repos","events_url":"https://api.github.com/users/Bytom/events{/privacy}","received_events_url":"https://api.github.com/users/Bytom/received_events","type":"Organization","site_admin":false},"repo":{"id":97181001,"name":"bytom","full_name":"Bytom/bytom","owner":{"login":"Bytom","id":28505705,"avatar_url":"https://avatars0.githubusercontent.com/u/28505705?v=4","gravatar_id":"","url":"https://api.github.com/users/Bytom","html_url":"https://github.com/Bytom","followers_url":"https://api.github.com/users/Bytom/followers","following_url":"https://api.github.com/users/Bytom/following{/other_user}","gists_url":"https://api.github.com/users/Bytom/gists{/gist_id}","starred_url":"https://api.github.com/users/Bytom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bytom/subscriptions","organizations_url":"https://api.github.com/users/Bytom/orgs","repos_url":"https://api.github.com/users/Bytom/repos","events_url":"https://api.github.com/users/Bytom/events{/privacy}","received_events_url":"https://api.github.com/users/Bytom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Bytom/bytom","description":"Official Go implementation of the Bytom protocol ","fork":false,"url":"https://api.github.com/repos/Bytom/bytom","forks_url":"https://api.github.com/repos/Bytom/bytom/forks","keys_url":"https://api.github.com/repos/Bytom/bytom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bytom/bytom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bytom/bytom/teams","hooks_url":"https://api.github.com/repos/Bytom/bytom/hooks","issue_events_url":"https://api.github.com/repos/Bytom/bytom/issues/events{/number}","events_url":"https://api.github.com/repos/Bytom/bytom/events","assignees_url":"https://api.github.com/repos/Bytom/bytom/assignees{/user}","branches_url":"https://api.github.com/repos/Bytom/bytom/branches{/branch}","tags_url":"https://api.github.com/repos/Bytom/bytom/tags","blobs_url":"https://api.github.com/repos/Bytom/bytom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bytom/bytom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bytom/bytom/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bytom/bytom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bytom/bytom/statuses/{sha}","languages_url":"https://api.github.com/repos/Bytom/bytom/languages","stargazers_url":"https://api.github.com/repos/Bytom/bytom/stargazers","contributors_url":"https://api.github.com/repos/Bytom/bytom/contributors","subscribers_url":"https://api.github.com/repos/Bytom/bytom/subscribers","subscription_url":"https://api.github.com/repos/Bytom/bytom/subscription","commits_url":"https://api.github.com/repos/Bytom/bytom/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bytom/bytom/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bytom/bytom/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bytom/bytom/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bytom/bytom/contents/{+path}","compare_url":"https://api.github.com/repos/Bytom/bytom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bytom/bytom/merges","archive_url":"https://api.github.com/repos/Bytom/bytom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bytom/bytom/downloads","issues_url":"https://api.github.com/repos/Bytom/bytom/issues{/number}","pulls_url":"https://api.github.com/repos/Bytom/bytom/pulls{/number}","milestones_url":"https://api.github.com/repos/Bytom/bytom/milestones{/number}","notifications_url":"https://api.github.com/repos/Bytom/bytom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bytom/bytom/labels{/name}","releases_url":"https://api.github.com/repos/Bytom/bytom/releases{/id}","deployments_url":"https://api.github.com/repos/Bytom/bytom/deployments","created_at":"2017-07-14T01:47:33Z","updated_at":"2018-04-16T06:39:39Z","pushed_at":"2018-04-16T11:41:52Z","git_url":"git://github.com/Bytom/bytom.git","ssh_url":"git@github.com:Bytom/bytom.git","clone_url":"https://github.com/Bytom/bytom.git","svn_url":"https://github.com/Bytom/bytom","homepage":"https://bytom.io/","size":48030,"stargazers_count":564,"watchers_count":564,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":176,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":176,"open_issues":32,"watchers":564,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/635"},"html":{"href":"https://github.com/Bytom/bytom/pull/635"},"issue":{"href":"https://api.github.com/repos/Bytom/bytom/issues/635"},"comments":{"href":"https://api.github.com/repos/Bytom/bytom/issues/635/comments"},"review_comments":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/635/comments"},"review_comment":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Bytom/bytom/pulls/635/commits"},"statuses":{"href":"https://api.github.com/repos/Bytom/bytom/statuses/8fe099d1c2376adefa1abd4ae40d9aac265d53a1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Paladz"}}