{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/61072150","id":61072150,"diff_hunk":"@@ -51,3 +54,34 @@ func TestHashJsonValidation(t *testing.T) {\n \t\t}\n \t}\n }\n+\n+func TestAddressUnmarshalJSON(t *testing.T) {\n+\tvar a Address\n+\tvar tests = []struct {\n+\t\tInput     string\n+\t\tShouldErr bool\n+\t\tOutput    *big.Int\n+\t}{\n+\t\t{\"\", true, nil},\n+\t\t{`\"\"`, true, nil},\n+\t\t{`\"0x\"`, true, nil},\n+\t\t{`\"0x00\"`, true, nil},\n+\t\t{`\"0xG000000000000000000000000000000000000000\"`, true, nil},\n+\t\t{`\"0x0000000000000000000000000000000000000000\"`, false, big.NewInt(0)},\n+\t\t{`\"0x0000000000000000000000000000000000000010\"`, false, big.NewInt(16)},\n+\t}\n+\tfor i, test := range tests {\n+\t\terr := a.UnmarshalJSON([]byte(test.Input))\n+\t\tif err != nil && !test.ShouldErr {\n+\t\t\tt.Error(i, \"expected no error got \", err)","path":"common/types_test.go","position":35,"original_position":35,"commit_id":"744753d084af066a115e11d638de5ff185d77214","original_commit_id":"744753d084af066a115e11d638de5ff185d77214","user":{"login":"karalabe","id":129561,"avatar_url":"https://avatars.githubusercontent.com/u/129561?v=3","gravatar_id":"","url":"https://api.github.com/users/karalabe","html_url":"https://github.com/karalabe","followers_url":"https://api.github.com/users/karalabe/followers","following_url":"https://api.github.com/users/karalabe/following{/other_user}","gists_url":"https://api.github.com/users/karalabe/gists{/gist_id}","starred_url":"https://api.github.com/users/karalabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karalabe/subscriptions","organizations_url":"https://api.github.com/users/karalabe/orgs","repos_url":"https://api.github.com/users/karalabe/repos","events_url":"https://api.github.com/users/karalabe/events{/privacy}","received_events_url":"https://api.github.com/users/karalabe/received_events","type":"User","site_admin":false},"body":"Didn't want to bother you with code you didn't write, but if you'd like, feel free to. We still have a lot of legacy code from Ethereum's proof-of-concept time where quality wasn't really a first class citizen. Since then we try to clean up things properly, so we try to take care of these styling issues much more strictly :)","created_at":"2016-04-26T11:54:59Z","updated_at":"2016-04-26T11:54:59Z","html_url":"https://github.com/ethereum/go-ethereum/pull/2484#discussion_r61072150","pull_request_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484","_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/61072150"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/2484#discussion_r61072150"},"pull_request":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484","id":67452864,"html_url":"https://github.com/ethereum/go-ethereum/pull/2484","diff_url":"https://github.com/ethereum/go-ethereum/pull/2484.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/2484.patch","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2484","number":2484,"state":"open","locked":false,"title":"Improve Address test coverage","user":{"login":"pcasaretto","id":817039,"avatar_url":"https://avatars.githubusercontent.com/u/817039?v=3","gravatar_id":"","url":"https://api.github.com/users/pcasaretto","html_url":"https://github.com/pcasaretto","followers_url":"https://api.github.com/users/pcasaretto/followers","following_url":"https://api.github.com/users/pcasaretto/following{/other_user}","gists_url":"https://api.github.com/users/pcasaretto/gists{/gist_id}","starred_url":"https://api.github.com/users/pcasaretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcasaretto/subscriptions","organizations_url":"https://api.github.com/users/pcasaretto/orgs","repos_url":"https://api.github.com/users/pcasaretto/repos","events_url":"https://api.github.com/users/pcasaretto/events{/privacy}","received_events_url":"https://api.github.com/users/pcasaretto/received_events","type":"User","site_admin":false},"body":"Add test for Address#UnmarshalJSON and a minor code improvement","created_at":"2016-04-22T03:01:42Z","updated_at":"2016-04-26T11:54:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0941dd7ca99873a60182d14003df9ca99d9ebf6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484/commits","review_comments_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484/comments","review_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2484/comments","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/744753d084af066a115e11d638de5ff185d77214","head":{"label":"pcasaretto:address-test-coverage","ref":"address-test-coverage","sha":"744753d084af066a115e11d638de5ff185d77214","user":{"login":"pcasaretto","id":817039,"avatar_url":"https://avatars.githubusercontent.com/u/817039?v=3","gravatar_id":"","url":"https://api.github.com/users/pcasaretto","html_url":"https://github.com/pcasaretto","followers_url":"https://api.github.com/users/pcasaretto/followers","following_url":"https://api.github.com/users/pcasaretto/following{/other_user}","gists_url":"https://api.github.com/users/pcasaretto/gists{/gist_id}","starred_url":"https://api.github.com/users/pcasaretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcasaretto/subscriptions","organizations_url":"https://api.github.com/users/pcasaretto/orgs","repos_url":"https://api.github.com/users/pcasaretto/repos","events_url":"https://api.github.com/users/pcasaretto/events{/privacy}","received_events_url":"https://api.github.com/users/pcasaretto/received_events","type":"User","site_admin":false},"repo":{"id":56820909,"name":"go-ethereum","full_name":"pcasaretto/go-ethereum","owner":{"login":"pcasaretto","id":817039,"avatar_url":"https://avatars.githubusercontent.com/u/817039?v=3","gravatar_id":"","url":"https://api.github.com/users/pcasaretto","html_url":"https://github.com/pcasaretto","followers_url":"https://api.github.com/users/pcasaretto/followers","following_url":"https://api.github.com/users/pcasaretto/following{/other_user}","gists_url":"https://api.github.com/users/pcasaretto/gists{/gist_id}","starred_url":"https://api.github.com/users/pcasaretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcasaretto/subscriptions","organizations_url":"https://api.github.com/users/pcasaretto/orgs","repos_url":"https://api.github.com/users/pcasaretto/repos","events_url":"https://api.github.com/users/pcasaretto/events{/privacy}","received_events_url":"https://api.github.com/users/pcasaretto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcasaretto/go-ethereum","description":"Official golang implementation of the Ethereum protocol","fork":true,"url":"https://api.github.com/repos/pcasaretto/go-ethereum","forks_url":"https://api.github.com/repos/pcasaretto/go-ethereum/forks","keys_url":"https://api.github.com/repos/pcasaretto/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcasaretto/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcasaretto/go-ethereum/teams","hooks_url":"https://api.github.com/repos/pcasaretto/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/pcasaretto/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/pcasaretto/go-ethereum/events","assignees_url":"https://api.github.com/repos/pcasaretto/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/pcasaretto/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/pcasaretto/go-ethereum/tags","blobs_url":"https://api.github.com/repos/pcasaretto/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcasaretto/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcasaretto/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcasaretto/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcasaretto/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/pcasaretto/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/pcasaretto/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/pcasaretto/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/pcasaretto/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/pcasaretto/go-ethereum/subscription","commits_url":"https://api.github.com/repos/pcasaretto/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcasaretto/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcasaretto/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcasaretto/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcasaretto/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/pcasaretto/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcasaretto/go-ethereum/merges","archive_url":"https://api.github.com/repos/pcasaretto/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcasaretto/go-ethereum/downloads","issues_url":"https://api.github.com/repos/pcasaretto/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/pcasaretto/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/pcasaretto/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/pcasaretto/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcasaretto/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/pcasaretto/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/pcasaretto/go-ethereum/deployments","created_at":"2016-04-22T02:40:31Z","updated_at":"2016-04-22T02:40:37Z","pushed_at":"2016-04-22T12:37:27Z","git_url":"git://github.com/pcasaretto/go-ethereum.git","ssh_url":"git@github.com:pcasaretto/go-ethereum.git","clone_url":"https://github.com/pcasaretto/go-ethereum.git","svn_url":"https://github.com/pcasaretto/go-ethereum","homepage":"http://ethereum.github.io/go-ethereum/","size":59824,"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":"ethereum:develop","ref":"develop","sha":"18580e152c1a2480b6245ebba4c62c202ed20ac6","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":15452919,"name":"go-ethereum","full_name":"ethereum/go-ethereum","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/go-ethereum","description":"Official golang implementation of the Ethereum protocol","fork":false,"url":"https://api.github.com/repos/ethereum/go-ethereum","forks_url":"https://api.github.com/repos/ethereum/go-ethereum/forks","keys_url":"https://api.github.com/repos/ethereum/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/go-ethereum/teams","hooks_url":"https://api.github.com/repos/ethereum/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/go-ethereum/events","assignees_url":"https://api.github.com/repos/ethereum/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/go-ethereum/tags","blobs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethereum/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethereum/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethereum/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethereum/go-ethereum/subscription","commits_url":"https://api.github.com/repos/ethereum/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/go-ethereum/merges","archive_url":"https://api.github.com/repos/ethereum/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/go-ethereum/downloads","issues_url":"https://api.github.com/repos/ethereum/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/go-ethereum/deployments","created_at":"2013-12-26T13:05:46Z","updated_at":"2016-04-25T03:16:37Z","pushed_at":"2016-04-26T08:39:19Z","git_url":"git://github.com/ethereum/go-ethereum.git","ssh_url":"git@github.com:ethereum/go-ethereum.git","clone_url":"https://github.com/ethereum/go-ethereum.git","svn_url":"https://github.com/ethereum/go-ethereum","homepage":"http://ethereum.github.io/go-ethereum/","size":163993,"stargazers_count":1384,"watchers_count":1384,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":439,"mirror_url":null,"open_issues_count":232,"forks":439,"open_issues":232,"watchers":1384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/2484"},"issue":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/2484"},"comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/2484/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2484/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/go-ethereum/statuses/744753d084af066a115e11d638de5ff185d77214"}}}}