{"action":"created","comment":{"url":"https://api.github.com/repos/google/trillian/pulls/comments/67678988","id":67678988,"diff_hunk":"@@ -157,6 +181,20 @@ func (t *TrillianLogServer) commitAndLog(tx storage.LogTX, op string) error {\n \treturn err\n }\n \n+func protoToLeaf(proto *trillian.LeafProto) trillian.LogLeaf {\n+\treturn trillian.LogLeaf{Leaf: trillian.Leaf{LeafHash: proto.LeafHash, LeafValue: proto.LeafData, ExtraData: proto.ExtraData}}\n+}\n+\n+func protosToLeaves(protos []*trillian.LeafProto) []trillian.LogLeaf {\n+\tleaves := make([]trillian.LogLeaf, 0, len(protos))\n+\n+\tfor _, proto := range protos {","path":"server/trillian_log_server.go","position":51,"original_position":51,"commit_id":"25ae39f04e8c2c6a5a14809d753d8da9264bca46","original_commit_id":"25ae39f04e8c2c6a5a14809d753d8da9264bca46","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"body":"since you know the size of this list in advance, you could `make()` it at the right size (i.e. `make(..., len(protos), len(protos))`), and then use the index from the `range()` to just set the array element directly rather than appending.)","created_at":"2016-06-20T12:10:53Z","updated_at":"2016-06-20T12:10:53Z","html_url":"https://github.com/google/trillian/pull/30#discussion_r67678988","pull_request_url":"https://api.github.com/repos/google/trillian/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/google/trillian/pulls/comments/67678988"},"html":{"href":"https://github.com/google/trillian/pull/30#discussion_r67678988"},"pull_request":{"href":"https://api.github.com/repos/google/trillian/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/google/trillian/pulls/30","id":74244570,"html_url":"https://github.com/google/trillian/pull/30","diff_url":"https://github.com/google/trillian/pull/30.diff","patch_url":"https://github.com/google/trillian/pull/30.patch","issue_url":"https://api.github.com/repos/google/trillian/issues/30","number":30,"state":"open","locked":false,"title":"Implement QueueLeaves operation in server","user":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"body":"+ a bugfix + tests.","created_at":"2016-06-17T13:44:38Z","updated_at":"2016-06-20T12:10:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8987b8b8d89aa073698ded858c608827c6c25044","assignee":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/google/trillian/milestones/1","html_url":"https://github.com/google/trillian/milestones/Initial%20demo","labels_url":"https://api.github.com/repos/google/trillian/milestones/1/labels","id":1798782,"number":1,"title":"Initial demo","description":"Aiming to have a very rough demo implementation of log, and possibly map. Exact scope still being discussed.","creator":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":16,"state":"open","created_at":"2016-05-31T13:28:52Z","updated_at":"2016-06-17T13:53:19Z","due_on":"2016-06-29T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/google/trillian/pulls/30/commits","review_comments_url":"https://api.github.com/repos/google/trillian/pulls/30/comments","review_comment_url":"https://api.github.com/repos/google/trillian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/trillian/issues/30/comments","statuses_url":"https://api.github.com/repos/google/trillian/statuses/25ae39f04e8c2c6a5a14809d753d8da9264bca46","head":{"label":"Martin2112:queueleaves","ref":"queueleaves","sha":"25ae39f04e8c2c6a5a14809d753d8da9264bca46","user":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"repo":{"id":60082567,"name":"trillian","full_name":"Martin2112/trillian","owner":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Martin2112/trillian","description":null,"fork":true,"url":"https://api.github.com/repos/Martin2112/trillian","forks_url":"https://api.github.com/repos/Martin2112/trillian/forks","keys_url":"https://api.github.com/repos/Martin2112/trillian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Martin2112/trillian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Martin2112/trillian/teams","hooks_url":"https://api.github.com/repos/Martin2112/trillian/hooks","issue_events_url":"https://api.github.com/repos/Martin2112/trillian/issues/events{/number}","events_url":"https://api.github.com/repos/Martin2112/trillian/events","assignees_url":"https://api.github.com/repos/Martin2112/trillian/assignees{/user}","branches_url":"https://api.github.com/repos/Martin2112/trillian/branches{/branch}","tags_url":"https://api.github.com/repos/Martin2112/trillian/tags","blobs_url":"https://api.github.com/repos/Martin2112/trillian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Martin2112/trillian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Martin2112/trillian/git/refs{/sha}","trees_url":"https://api.github.com/repos/Martin2112/trillian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Martin2112/trillian/statuses/{sha}","languages_url":"https://api.github.com/repos/Martin2112/trillian/languages","stargazers_url":"https://api.github.com/repos/Martin2112/trillian/stargazers","contributors_url":"https://api.github.com/repos/Martin2112/trillian/contributors","subscribers_url":"https://api.github.com/repos/Martin2112/trillian/subscribers","subscription_url":"https://api.github.com/repos/Martin2112/trillian/subscription","commits_url":"https://api.github.com/repos/Martin2112/trillian/commits{/sha}","git_commits_url":"https://api.github.com/repos/Martin2112/trillian/git/commits{/sha}","comments_url":"https://api.github.com/repos/Martin2112/trillian/comments{/number}","issue_comment_url":"https://api.github.com/repos/Martin2112/trillian/issues/comments{/number}","contents_url":"https://api.github.com/repos/Martin2112/trillian/contents/{+path}","compare_url":"https://api.github.com/repos/Martin2112/trillian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Martin2112/trillian/merges","archive_url":"https://api.github.com/repos/Martin2112/trillian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Martin2112/trillian/downloads","issues_url":"https://api.github.com/repos/Martin2112/trillian/issues{/number}","pulls_url":"https://api.github.com/repos/Martin2112/trillian/pulls{/number}","milestones_url":"https://api.github.com/repos/Martin2112/trillian/milestones{/number}","notifications_url":"https://api.github.com/repos/Martin2112/trillian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Martin2112/trillian/labels{/name}","releases_url":"https://api.github.com/repos/Martin2112/trillian/releases{/id}","deployments_url":"https://api.github.com/repos/Martin2112/trillian/deployments","created_at":"2016-05-31T11:07:09Z","updated_at":"2016-05-31T11:07:10Z","pushed_at":"2016-06-17T13:46:17Z","git_url":"git://github.com/Martin2112/trillian.git","ssh_url":"git@github.com:Martin2112/trillian.git","clone_url":"https://github.com/Martin2112/trillian.git","svn_url":"https://github.com/Martin2112/trillian","homepage":null,"size":470,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"f539f7ad7985990408add1961f49d1b47d5a0e27","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":58654489,"name":"trillian","full_name":"google/trillian","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/trillian","description":null,"fork":false,"url":"https://api.github.com/repos/google/trillian","forks_url":"https://api.github.com/repos/google/trillian/forks","keys_url":"https://api.github.com/repos/google/trillian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/trillian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/trillian/teams","hooks_url":"https://api.github.com/repos/google/trillian/hooks","issue_events_url":"https://api.github.com/repos/google/trillian/issues/events{/number}","events_url":"https://api.github.com/repos/google/trillian/events","assignees_url":"https://api.github.com/repos/google/trillian/assignees{/user}","branches_url":"https://api.github.com/repos/google/trillian/branches{/branch}","tags_url":"https://api.github.com/repos/google/trillian/tags","blobs_url":"https://api.github.com/repos/google/trillian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/trillian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/trillian/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/trillian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/trillian/statuses/{sha}","languages_url":"https://api.github.com/repos/google/trillian/languages","stargazers_url":"https://api.github.com/repos/google/trillian/stargazers","contributors_url":"https://api.github.com/repos/google/trillian/contributors","subscribers_url":"https://api.github.com/repos/google/trillian/subscribers","subscription_url":"https://api.github.com/repos/google/trillian/subscription","commits_url":"https://api.github.com/repos/google/trillian/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/trillian/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/trillian/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/trillian/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/trillian/contents/{+path}","compare_url":"https://api.github.com/repos/google/trillian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/trillian/merges","archive_url":"https://api.github.com/repos/google/trillian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/trillian/downloads","issues_url":"https://api.github.com/repos/google/trillian/issues{/number}","pulls_url":"https://api.github.com/repos/google/trillian/pulls{/number}","milestones_url":"https://api.github.com/repos/google/trillian/milestones{/number}","notifications_url":"https://api.github.com/repos/google/trillian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/trillian/labels{/name}","releases_url":"https://api.github.com/repos/google/trillian/releases{/id}","deployments_url":"https://api.github.com/repos/google/trillian/deployments","created_at":"2016-05-12T15:37:35Z","updated_at":"2016-06-19T07:07:46Z","pushed_at":"2016-06-17T20:47:44Z","git_url":"git://github.com/google/trillian.git","ssh_url":"git@github.com:google/trillian.git","clone_url":"https://github.com/google/trillian.git","svn_url":"https://github.com/google/trillian","homepage":null,"size":493,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/trillian/pulls/30"},"html":{"href":"https://github.com/google/trillian/pull/30"},"issue":{"href":"https://api.github.com/repos/google/trillian/issues/30"},"comments":{"href":"https://api.github.com/repos/google/trillian/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/google/trillian/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/google/trillian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/trillian/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/google/trillian/statuses/25ae39f04e8c2c6a5a14809d753d8da9264bca46"}}}}
{"actor":{"display_login":"AlCutter"}}