GitHub PullRequestReviewCommentEvent at 2014-09-03 19:36:14
Repository: btcwallet
Actor: larshesel
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/monetas/btcwallet/pulls/comments/17074186","id":17074186,"diff_hunk":"@@ -119,44 +118,63 @@ func (vp *VotingPool) saveSeriesToDisk(seriesID uint32, data *seriesData) error\n \treturn nil\n }\n \n-func (vp *VotingPool) CreateSeries(seriesID uint32, rawPubKeys []string, reqSigs uint32) error {\n-\tif vp.GetSeries(seriesID) != nil {\n-\t\t// TODO: define error codes\n-\t\treturn managerError(0, fmt.Sprintf(\"Series #%d already exists\", seriesID), nil)\n-\t}\n-\n+func convertKeys(rawPubKeys []string) ([]*hdkeychain.ExtendedKey, error) {\n \tkeys := make([]*hdkeychain.ExtendedKey, len(rawPubKeys))\n-\tsort.Sort(sort.StringSlice(rawPubKeys))\n-\n \tfor i, rawPubKey := range rawPubKeys {\n \t\tkey, err := hdkeychain.NewKeyFromString(rawPubKey)\n+\t\tkeys[i] = key\n \t\tif err != nil {\n \t\t\tstr := fmt.Sprintf(\"Invalid extended public key %v\", rawPubKey)\n-\t\t\treturn managerError(0, str, err)\n-\t\t}\n-\t\tif key.IsPrivate() {\n-\t\t\treturn managerError(0, \"Please only use public extended keys\", nil)\n+\t\t\treturn nil, managerError(0, str, err)\n \t\t}\n-\t\tkeys[i] = key\n \t}\n+\treturn keys, nil\n+}\n+\n+func (vp *VotingPool) putSeries(seriesID uint32, rawPubKeys []string, reqSigs uint32) error {\n+\tsort.Sort(sort.StringSlice(rawPubKeys))\n+\n+\tkeys, err := convertKeys(rawPubKeys)\n+\tif err != nil {\n+\t\tstr := fmt.Sprintf(\"Key conversion failed for series #%d\", seriesID)\n+\t\treturn managerError(0, str, err)","path":"waddrmgr/pool.go","position":44,"original_position":44,"commit_id":"e3b766d91817e2dfdb44157847c60e9c61eccfc4","original_commit_id":"e3b766d91817e2dfdb44157847c60e9c61eccfc4","user":{"login":"larshesel","id":679187,"avatar_url":"https://avatars.githubusercontent.com/u/679187?v=2","gravatar_id":"aae5b1e1b647c74164ae9601b41f9ca6","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"body":"Yeah, you're right. I might have thought I wanted a more context specific error, but I don't really.","created_at":"2014-09-03T19:36:14Z","updated_at":"2014-09-03T19:36:14Z","html_url":"https://github.com/monetas/btcwallet/pull/25#discussion_r17074186","pull_request_url":"https://api.github.com/repos/monetas/btcwallet/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/comments/17074186"},"html":{"href":"https://github.com/monetas/btcwallet/pull/25#discussion_r17074186"},"pull_request":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/monetas/btcwallet/pulls/25","id":20693141,"html_url":"https://github.com/monetas/btcwallet/pull/25","diff_url":"https://github.com/monetas/btcwallet/pull/25.diff","patch_url":"https://github.com/monetas/btcwallet/pull/25.patch","issue_url":"https://api.github.com/repos/monetas/btcwallet/issues/25","number":25,"state":"open","locked":false,"title":"Add ReplaceSeries and refactor the CreateSeries function into smaller steps","user":{"login":"larshesel","id":679187,"avatar_url":"https://avatars.githubusercontent.com/u/679187?v=2","gravatar_id":"aae5b1e1b647c74164ae9601b41f9ca6","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-03T17:40:23Z","updated_at":"2014-09-03T19:36:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13474473c4ee0200867082a39888287e54bab5b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/monetas/btcwallet/pulls/25/commits","review_comments_url":"https://api.github.com/repos/monetas/btcwallet/pulls/25/comments","review_comment_url":"https://api.github.com/repos/monetas/btcwallet/pulls/comments/{number}","comments_url":"https://api.github.com/repos/monetas/btcwallet/issues/25/comments","statuses_url":"https://api.github.com/repos/monetas/btcwallet/statuses/e3b766d91817e2dfdb44157847c60e9c61eccfc4","head":{"label":"larshesel:vp","ref":"vp","sha":"e3b766d91817e2dfdb44157847c60e9c61eccfc4","user":{"login":"larshesel","id":679187,"avatar_url":"https://avatars.githubusercontent.com/u/679187?v=2","gravatar_id":"aae5b1e1b647c74164ae9601b41f9ca6","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"repo":{"id":23446423,"name":"btcwallet","full_name":"larshesel/btcwallet","owner":{"login":"larshesel","id":679187,"avatar_url":"https://avatars.githubusercontent.com/u/679187?v=2","gravatar_id":"aae5b1e1b647c74164ae9601b41f9ca6","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larshesel/btcwallet","description":"","fork":true,"url":"https://api.github.com/repos/larshesel/btcwallet","forks_url":"https://api.github.com/repos/larshesel/btcwallet/forks","keys_url":"https://api.github.com/repos/larshesel/btcwallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larshesel/btcwallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larshesel/btcwallet/teams","hooks_url":"https://api.github.com/repos/larshesel/btcwallet/hooks","issue_events_url":"https://api.github.com/repos/larshesel/btcwallet/issues/events{/number}","events_url":"https://api.github.com/repos/larshesel/btcwallet/events","assignees_url":"https://api.github.com/repos/larshesel/btcwallet/assignees{/user}","branches_url":"https://api.github.com/repos/larshesel/btcwallet/branches{/branch}","tags_url":"https://api.github.com/repos/larshesel/btcwallet/tags","blobs_url":"https://api.github.com/repos/larshesel/btcwallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larshesel/btcwallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larshesel/btcwallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/larshesel/btcwallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larshesel/btcwallet/statuses/{sha}","languages_url":"https://api.github.com/repos/larshesel/btcwallet/languages","stargazers_url":"https://api.github.com/repos/larshesel/btcwallet/stargazers","contributors_url":"https://api.github.com/repos/larshesel/btcwallet/contributors","subscribers_url":"https://api.github.com/repos/larshesel/btcwallet/subscribers","subscription_url":"https://api.github.com/repos/larshesel/btcwallet/subscription","commits_url":"https://api.github.com/repos/larshesel/btcwallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/larshesel/btcwallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/larshesel/btcwallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/larshesel/btcwallet/issues/comments/{number}","contents_url":"https://api.github.com/repos/larshesel/btcwallet/contents/{+path}","compare_url":"https://api.github.com/repos/larshesel/btcwallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larshesel/btcwallet/merges","archive_url":"https://api.github.com/repos/larshesel/btcwallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larshesel/btcwallet/downloads","issues_url":"https://api.github.com/repos/larshesel/btcwallet/issues{/number}","pulls_url":"https://api.github.com/repos/larshesel/btcwallet/pulls{/number}","milestones_url":"https://api.github.com/repos/larshesel/btcwallet/milestones{/number}","notifications_url":"https://api.github.com/repos/larshesel/btcwallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larshesel/btcwallet/labels{/name}","releases_url":"https://api.github.com/repos/larshesel/btcwallet/releases{/id}","created_at":"2014-08-28T23:40:20Z","updated_at":"2014-07-04T22:26:10Z","pushed_at":"2014-09-03T17:39:47Z","git_url":"git://github.com/larshesel/btcwallet.git","ssh_url":"git@github.com:larshesel/btcwallet.git","clone_url":"https://github.com/larshesel/btcwallet.git","svn_url":"https://github.com/larshesel/btcwallet","homepage":null,"size":1400,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"monetas:vp","ref":"vp","sha":"5095e89ea7c4fa13efaffeb80217b9cefc85ffb5","user":{"login":"monetas","id":4219418,"avatar_url":"https://avatars.githubusercontent.com/u/4219418?v=2","gravatar_id":"100bc0676640de8cd388e11854763858","url":"https://api.github.com/users/monetas","html_url":"https://github.com/monetas","followers_url":"https://api.github.com/users/monetas/followers","following_url":"https://api.github.com/users/monetas/following{/other_user}","gists_url":"https://api.github.com/users/monetas/gists{/gist_id}","starred_url":"https://api.github.com/users/monetas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monetas/subscriptions","organizations_url":"https://api.github.com/users/monetas/orgs","repos_url":"https://api.github.com/users/monetas/repos","events_url":"https://api.github.com/users/monetas/events{/privacy}","received_events_url":"https://api.github.com/users/monetas/received_events","type":"Organization","site_admin":false},"repo":{"id":20325032,"name":"btcwallet","full_name":"monetas/btcwallet","owner":{"login":"monetas","id":4219418,"avatar_url":"https://avatars.githubusercontent.com/u/4219418?v=2","gravatar_id":"100bc0676640de8cd388e11854763858","url":"https://api.github.com/users/monetas","html_url":"https://github.com/monetas","followers_url":"https://api.github.com/users/monetas/followers","following_url":"https://api.github.com/users/monetas/following{/other_user}","gists_url":"https://api.github.com/users/monetas/gists{/gist_id}","starred_url":"https://api.github.com/users/monetas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monetas/subscriptions","organizations_url":"https://api.github.com/users/monetas/orgs","repos_url":"https://api.github.com/users/monetas/repos","events_url":"https://api.github.com/users/monetas/events{/privacy}","received_events_url":"https://api.github.com/users/monetas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/monetas/btcwallet","description":"","fork":true,"url":"https://api.github.com/repos/monetas/btcwallet","forks_url":"https://api.github.com/repos/monetas/btcwallet/forks","keys_url":"https://api.github.com/repos/monetas/btcwallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monetas/btcwallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monetas/btcwallet/teams","hooks_url":"https://api.github.com/repos/monetas/btcwallet/hooks","issue_events_url":"https://api.github.com/repos/monetas/btcwallet/issues/events{/number}","events_url":"https://api.github.com/repos/monetas/btcwallet/events","assignees_url":"https://api.github.com/repos/monetas/btcwallet/assignees{/user}","branches_url":"https://api.github.com/repos/monetas/btcwallet/branches{/branch}","tags_url":"https://api.github.com/repos/monetas/btcwallet/tags","blobs_url":"https://api.github.com/repos/monetas/btcwallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monetas/btcwallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monetas/btcwallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/monetas/btcwallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monetas/btcwallet/statuses/{sha}","languages_url":"https://api.github.com/repos/monetas/btcwallet/languages","stargazers_url":"https://api.github.com/repos/monetas/btcwallet/stargazers","contributors_url":"https://api.github.com/repos/monetas/btcwallet/contributors","subscribers_url":"https://api.github.com/repos/monetas/btcwallet/subscribers","subscription_url":"https://api.github.com/repos/monetas/btcwallet/subscription","commits_url":"https://api.github.com/repos/monetas/btcwallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/monetas/btcwallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/monetas/btcwallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/monetas/btcwallet/issues/comments/{number}","contents_url":"https://api.github.com/repos/monetas/btcwallet/contents/{+path}","compare_url":"https://api.github.com/repos/monetas/btcwallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monetas/btcwallet/merges","archive_url":"https://api.github.com/repos/monetas/btcwallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monetas/btcwallet/downloads","issues_url":"https://api.github.com/repos/monetas/btcwallet/issues{/number}","pulls_url":"https://api.github.com/repos/monetas/btcwallet/pulls{/number}","milestones_url":"https://api.github.com/repos/monetas/btcwallet/milestones{/number}","notifications_url":"https://api.github.com/repos/monetas/btcwallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monetas/btcwallet/labels{/name}","releases_url":"https://api.github.com/repos/monetas/btcwallet/releases{/id}","created_at":"2014-05-30T09:52:21Z","updated_at":"2014-07-04T22:26:10Z","pushed_at":"2014-09-03T19:22:43Z","git_url":"git://github.com/monetas/btcwallet.git","ssh_url":"git@github.com:monetas/btcwallet.git","clone_url":"https://github.com/monetas/btcwallet.git","svn_url":"https://github.com/monetas/btcwallet","homepage":null,"size":2174,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/25"},"html":{"href":"https://github.com/monetas/btcwallet/pull/25"},"issue":{"href":"https://api.github.com/repos/monetas/btcwallet/issues/25"},"comments":{"href":"https://api.github.com/repos/monetas/btcwallet/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/monetas/btcwallet/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/monetas/btcwallet/statuses/e3b766d91817e2dfdb44157847c60e9c61eccfc4"}}}}