{"action":"created","comment":{"url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/comments/27050394","id":27050394,"diff_hunk":"@@ -70,7 +139,7 @@ func putPool(tx walletdb.Tx, votingPoolID []byte) error {\n // loadAllSeries returns a map of all the series stored inside a voting pool\n // bucket, keyed by id.\n func loadAllSeries(tx walletdb.Tx, votingPoolID []byte) (map[uint32]*dbSeriesRow, error) {","path":"votingpool/db.go","position":113,"original_position":113,"commit_id":"f0159aea0ed9f670f0c4a9eb8947747ebb155214","original_commit_id":"f0159aea0ed9f670f0c4a9eb8947747ebb155214","user":{"login":"davecgh","id":2115102,"avatar_url":"https://avatars.githubusercontent.com/u/2115102?v=3","gravatar_id":"","url":"https://api.github.com/users/davecgh","html_url":"https://github.com/davecgh","followers_url":"https://api.github.com/users/davecgh/followers","following_url":"https://api.github.com/users/davecgh/following{/other_user}","gists_url":"https://api.github.com/users/davecgh/gists{/gist_id}","starred_url":"https://api.github.com/users/davecgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecgh/subscriptions","organizations_url":"https://api.github.com/users/davecgh/orgs","repos_url":"https://api.github.com/users/davecgh/repos","events_url":"https://api.github.com/users/davecgh/events{/privacy}","received_events_url":"https://api.github.com/users/davecgh/received_events","type":"User","site_admin":false},"body":"After discussing this some more, see #215 for details on the planned direction to resole this in waddrmgr.  I suspect a similar approach here wold work well.  We're also adding a `Cursor` to walletdb, so depending on how the keys are actually stored and the need to do scans, there might be further optimization potential there.  Given the current code though, I suspect an iterator-style callback will work well here too.","created_at":"2015-03-24T17:12:59Z","updated_at":"2015-03-24T17:12:59Z","html_url":"https://github.com/btcsuite/btcwallet/pull/178#discussion_r27050394","pull_request_url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178","_links":{"self":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/comments/27050394"},"html":{"href":"https://github.com/btcsuite/btcwallet/pull/178#discussion_r27050394"},"pull_request":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178"}}},"pull_request":{"url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178","id":28357408,"html_url":"https://github.com/btcsuite/btcwallet/pull/178","diff_url":"https://github.com/btcsuite/btcwallet/pull/178.diff","patch_url":"https://github.com/btcsuite/btcwallet/pull/178.patch","issue_url":"https://api.github.com/repos/btcsuite/btcwallet/issues/178","number":178,"state":"open","locked":false,"title":"Implement votingpool's startwithdrawal","user":{"login":"gsalgado","id":412274,"avatar_url":"https://avatars.githubusercontent.com/u/412274?v=3","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"body":"http://opentransactions.org/wiki/index.php/Startwithdrawal is basically what\r\nthis implements.  The interesting bits are in withdrawal.go and\r\ninput_selection.go. The former has the implementation of http://goo.gl/iUrQ3s\r\nand the latter implements http://goo.gl/znOECm.\r\n\r\nThere are a lot of mechanical changes (e.g. votingPool -> pool in variables,\r\nvp -> p in method receivers) and moving of some tests (e.g.  serialization) to\r\npool_wb_test.go\r\n\r\nIt also includes a couple functions to construct sigscripts using the raw\r\nsignatures returned by Pool.StartWithdrawal(). These are going to be used in\r\nthe implementation of\r\nhttp://opentransactions.org/wiki/index.php/Updatewithdrawal but right now\r\nthey're used in tests to make sure the signatures returned by startwithdrawal\r\nare correct.\r\n\r\nSome of our test files have a _wb_ infix, which stands for whitebox. These are\r\nin the same package (votingpool) as the actual code they test, so that they\r\ncan access the internal bits. We decided to use this approach because\r\nthere are too many internal bits (including data types) we wanted to test\r\nthoroughly and it'd be annoying to use internal_test.go to expose them all for\r\ntests.","created_at":"2015-01-30T12:19:38Z","updated_at":"2015-03-24T17:12:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a6fdd114fb793d83ea099ae54758e7e4014ce3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178/commits","review_comments_url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178/comments","review_comment_url":"https://api.github.com/repos/btcsuite/btcwallet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/btcsuite/btcwallet/issues/178/comments","statuses_url":"https://api.github.com/repos/btcsuite/btcwallet/statuses/f0159aea0ed9f670f0c4a9eb8947747ebb155214","head":{"label":"gsalgado:vp-withdrawal","ref":"vp-withdrawal","sha":"f0159aea0ed9f670f0c4a9eb8947747ebb155214","user":{"login":"gsalgado","id":412274,"avatar_url":"https://avatars.githubusercontent.com/u/412274?v=3","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"repo":{"id":23590062,"name":"btcwallet","full_name":"gsalgado/btcwallet","owner":{"login":"gsalgado","id":412274,"avatar_url":"https://avatars.githubusercontent.com/u/412274?v=3","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gsalgado/btcwallet","description":"","fork":true,"url":"https://api.github.com/repos/gsalgado/btcwallet","forks_url":"https://api.github.com/repos/gsalgado/btcwallet/forks","keys_url":"https://api.github.com/repos/gsalgado/btcwallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsalgado/btcwallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsalgado/btcwallet/teams","hooks_url":"https://api.github.com/repos/gsalgado/btcwallet/hooks","issue_events_url":"https://api.github.com/repos/gsalgado/btcwallet/issues/events{/number}","events_url":"https://api.github.com/repos/gsalgado/btcwallet/events","assignees_url":"https://api.github.com/repos/gsalgado/btcwallet/assignees{/user}","branches_url":"https://api.github.com/repos/gsalgado/btcwallet/branches{/branch}","tags_url":"https://api.github.com/repos/gsalgado/btcwallet/tags","blobs_url":"https://api.github.com/repos/gsalgado/btcwallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsalgado/btcwallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsalgado/btcwallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsalgado/btcwallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsalgado/btcwallet/statuses/{sha}","languages_url":"https://api.github.com/repos/gsalgado/btcwallet/languages","stargazers_url":"https://api.github.com/repos/gsalgado/btcwallet/stargazers","contributors_url":"https://api.github.com/repos/gsalgado/btcwallet/contributors","subscribers_url":"https://api.github.com/repos/gsalgado/btcwallet/subscribers","subscription_url":"https://api.github.com/repos/gsalgado/btcwallet/subscription","commits_url":"https://api.github.com/repos/gsalgado/btcwallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsalgado/btcwallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsalgado/btcwallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsalgado/btcwallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsalgado/btcwallet/contents/{+path}","compare_url":"https://api.github.com/repos/gsalgado/btcwallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsalgado/btcwallet/merges","archive_url":"https://api.github.com/repos/gsalgado/btcwallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsalgado/btcwallet/downloads","issues_url":"https://api.github.com/repos/gsalgado/btcwallet/issues{/number}","pulls_url":"https://api.github.com/repos/gsalgado/btcwallet/pulls{/number}","milestones_url":"https://api.github.com/repos/gsalgado/btcwallet/milestones{/number}","notifications_url":"https://api.github.com/repos/gsalgado/btcwallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsalgado/btcwallet/labels{/name}","releases_url":"https://api.github.com/repos/gsalgado/btcwallet/releases{/id}","created_at":"2014-09-02T18:16:22Z","updated_at":"2015-03-19T10:27:33Z","pushed_at":"2015-03-20T09:28:04Z","git_url":"git://github.com/gsalgado/btcwallet.git","ssh_url":"git@github.com:gsalgado/btcwallet.git","clone_url":"https://github.com/gsalgado/btcwallet.git","svn_url":"https://github.com/gsalgado/btcwallet","homepage":null,"size":3627,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"btcsuite:master","ref":"master","sha":"68a9168d9e127c77138d2954a80470ea6113c67e","user":{"login":"btcsuite","id":10235229,"avatar_url":"https://avatars.githubusercontent.com/u/10235229?v=3","gravatar_id":"","url":"https://api.github.com/users/btcsuite","html_url":"https://github.com/btcsuite","followers_url":"https://api.github.com/users/btcsuite/followers","following_url":"https://api.github.com/users/btcsuite/following{/other_user}","gists_url":"https://api.github.com/users/btcsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/btcsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btcsuite/subscriptions","organizations_url":"https://api.github.com/users/btcsuite/orgs","repos_url":"https://api.github.com/users/btcsuite/repos","events_url":"https://api.github.com/users/btcsuite/events{/privacy}","received_events_url":"https://api.github.com/users/btcsuite/received_events","type":"Organization","site_admin":false},"repo":{"id":12136863,"name":"btcwallet","full_name":"btcsuite/btcwallet","owner":{"login":"btcsuite","id":10235229,"avatar_url":"https://avatars.githubusercontent.com/u/10235229?v=3","gravatar_id":"","url":"https://api.github.com/users/btcsuite","html_url":"https://github.com/btcsuite","followers_url":"https://api.github.com/users/btcsuite/followers","following_url":"https://api.github.com/users/btcsuite/following{/other_user}","gists_url":"https://api.github.com/users/btcsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/btcsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btcsuite/subscriptions","organizations_url":"https://api.github.com/users/btcsuite/orgs","repos_url":"https://api.github.com/users/btcsuite/repos","events_url":"https://api.github.com/users/btcsuite/events{/privacy}","received_events_url":"https://api.github.com/users/btcsuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/btcsuite/btcwallet","description":"","fork":false,"url":"https://api.github.com/repos/btcsuite/btcwallet","forks_url":"https://api.github.com/repos/btcsuite/btcwallet/forks","keys_url":"https://api.github.com/repos/btcsuite/btcwallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btcsuite/btcwallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btcsuite/btcwallet/teams","hooks_url":"https://api.github.com/repos/btcsuite/btcwallet/hooks","issue_events_url":"https://api.github.com/repos/btcsuite/btcwallet/issues/events{/number}","events_url":"https://api.github.com/repos/btcsuite/btcwallet/events","assignees_url":"https://api.github.com/repos/btcsuite/btcwallet/assignees{/user}","branches_url":"https://api.github.com/repos/btcsuite/btcwallet/branches{/branch}","tags_url":"https://api.github.com/repos/btcsuite/btcwallet/tags","blobs_url":"https://api.github.com/repos/btcsuite/btcwallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btcsuite/btcwallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btcsuite/btcwallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/btcsuite/btcwallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btcsuite/btcwallet/statuses/{sha}","languages_url":"https://api.github.com/repos/btcsuite/btcwallet/languages","stargazers_url":"https://api.github.com/repos/btcsuite/btcwallet/stargazers","contributors_url":"https://api.github.com/repos/btcsuite/btcwallet/contributors","subscribers_url":"https://api.github.com/repos/btcsuite/btcwallet/subscribers","subscription_url":"https://api.github.com/repos/btcsuite/btcwallet/subscription","commits_url":"https://api.github.com/repos/btcsuite/btcwallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/btcsuite/btcwallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/btcsuite/btcwallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/btcsuite/btcwallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/btcsuite/btcwallet/contents/{+path}","compare_url":"https://api.github.com/repos/btcsuite/btcwallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btcsuite/btcwallet/merges","archive_url":"https://api.github.com/repos/btcsuite/btcwallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btcsuite/btcwallet/downloads","issues_url":"https://api.github.com/repos/btcsuite/btcwallet/issues{/number}","pulls_url":"https://api.github.com/repos/btcsuite/btcwallet/pulls{/number}","milestones_url":"https://api.github.com/repos/btcsuite/btcwallet/milestones{/number}","notifications_url":"https://api.github.com/repos/btcsuite/btcwallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btcsuite/btcwallet/labels{/name}","releases_url":"https://api.github.com/repos/btcsuite/btcwallet/releases{/id}","created_at":"2013-08-15T14:53:57Z","updated_at":"2015-03-19T01:13:22Z","pushed_at":"2015-03-24T15:41:22Z","git_url":"git://github.com/btcsuite/btcwallet.git","ssh_url":"git@github.com:btcsuite/btcwallet.git","clone_url":"https://github.com/btcsuite/btcwallet.git","svn_url":"https://github.com/btcsuite/btcwallet","homepage":null,"size":6577,"stargazers_count":61,"watchers_count":61,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":25,"forks":35,"open_issues":25,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178"},"html":{"href":"https://github.com/btcsuite/btcwallet/pull/178"},"issue":{"href":"https://api.github.com/repos/btcsuite/btcwallet/issues/178"},"comments":{"href":"https://api.github.com/repos/btcsuite/btcwallet/issues/178/comments"},"review_comments":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178/comments"},"review_comment":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/btcsuite/btcwallet/pulls/178/commits"},"statuses":{"href":"https://api.github.com/repos/btcsuite/btcwallet/statuses/f0159aea0ed9f670f0c4a9eb8947747ebb155214"}}}}