{"action":"created","comment":{"url":"https://api.github.com/repos/ethcore/parity/pulls/comments/76209311","id":76209311,"diff_hunk":"@@ -171,56 +173,56 @@ impl Engine for Ethash {\n \n \tfn verify_block_basic(&self, header: &Header, _block: Option<&[u8]>) -> result::Result<(), Error> {\n \t\t// check the seal fields.\n-\t\tif header.seal.len() != self.seal_fields() {\n+\t\tif header.seal().len() != self.seal_fields() {\n \t\t\treturn Err(From::from(BlockError::InvalidSealArity(\n-\t\t\t\tMismatch { expected: self.seal_fields(), found: header.seal.len() }\n+\t\t\t\tMismatch { expected: self.seal_fields(), found: header.seal().len() }\n \t\t\t)));\n \t\t}\n-\t\ttry!(UntrustedRlp::new(&header.seal[0]).as_val::<H256>());\n-\t\ttry!(UntrustedRlp::new(&header.seal[1]).as_val::<H64>());\n+\t\ttry!(UntrustedRlp::new(&header.seal()[0]).as_val::<H256>());\n+\t\ttry!(UntrustedRlp::new(&header.seal()[1]).as_val::<H64>());\n \n \t\t// TODO: consider removing these lines.\n \t\tlet min_difficulty = self.ethash_params.minimum_difficulty;\n-\t\tif header.difficulty < min_difficulty {\n-\t\t\treturn Err(From::from(BlockError::DifficultyOutOfBounds(OutOfBounds { min: Some(min_difficulty), max: None, found: header.difficulty })))\n+\t\tif header.difficulty().clone() < min_difficulty {","path":"ethcore/src/ethereum/ethash.rs","position":73,"original_position":73,"commit_id":"d05a504285a5c69ef7aab2cd46a4c9f0530cc9f3","original_commit_id":"d05a504285a5c69ef7aab2cd46a4c9f0530cc9f3","user":{"login":"rphmeier","id":10121380,"avatar_url":"https://avatars.githubusercontent.com/u/10121380?v=3","gravatar_id":"","url":"https://api.github.com/users/rphmeier","html_url":"https://github.com/rphmeier","followers_url":"https://api.github.com/users/rphmeier/followers","following_url":"https://api.github.com/users/rphmeier/following{/other_user}","gists_url":"https://api.github.com/users/rphmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/rphmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rphmeier/subscriptions","organizations_url":"https://api.github.com/users/rphmeier/orgs","repos_url":"https://api.github.com/users/rphmeier/repos","events_url":"https://api.github.com/users/rphmeier/events{/privacy}","received_events_url":"https://api.github.com/users/rphmeier/received_events","type":"User","site_admin":false},"body":"should be able to just do `if header.difficulty() < &min_difficulty`","created_at":"2016-08-25T09:25:38Z","updated_at":"2016-08-25T09:25:38Z","html_url":"https://github.com/ethcore/parity/pull/2000#discussion_r76209311","pull_request_url":"https://api.github.com/repos/ethcore/parity/pulls/2000","_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments/76209311"},"html":{"href":"https://github.com/ethcore/parity/pull/2000#discussion_r76209311"},"pull_request":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2000"}}},"pull_request":{"url":"https://api.github.com/repos/ethcore/parity/pulls/2000","id":82579490,"html_url":"https://github.com/ethcore/parity/pull/2000","diff_url":"https://github.com/ethcore/parity/pull/2000.diff","patch_url":"https://github.com/ethcore/parity/pull/2000.patch","issue_url":"https://api.github.com/repos/ethcore/parity/issues/2000","number":2000,"state":"open","locked":false,"title":"Make the block header struct's internals private","user":{"login":"nipunn1313","id":1300387,"avatar_url":"https://avatars.githubusercontent.com/u/1300387?v=3","gravatar_id":"","url":"https://api.github.com/users/nipunn1313","html_url":"https://github.com/nipunn1313","followers_url":"https://api.github.com/users/nipunn1313/followers","following_url":"https://api.github.com/users/nipunn1313/following{/other_user}","gists_url":"https://api.github.com/users/nipunn1313/gists{/gist_id}","starred_url":"https://api.github.com/users/nipunn1313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipunn1313/subscriptions","organizations_url":"https://api.github.com/users/nipunn1313/orgs","repos_url":"https://api.github.com/users/nipunn1313/repos","events_url":"https://api.github.com/users/nipunn1313/events{/privacy}","received_events_url":"https://api.github.com/users/nipunn1313/received_events","type":"User","site_admin":false},"body":"Currently, this involves a lot of explicit cloning, but we\r\ncould migrate the return types of the get_* functions to\r\nbe copies rather than references since they are mostly copy\r\ntypes anyway.\r\n\r\nI opted to eliminate the constructor in favor of using\r\nDefault::default() plus calling a bunch of setters. This\r\nis similar to the model that a Google Protobuf client uses\r\nand I think it looks fine.","created_at":"2016-08-24T16:55:45Z","updated_at":"2016-08-25T09:25:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fc7043b1627c96bf2653a6963b8f59e10bf723c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethcore/parity/pulls/2000/commits","review_comments_url":"https://api.github.com/repos/ethcore/parity/pulls/2000/comments","review_comment_url":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethcore/parity/issues/2000/comments","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/d05a504285a5c69ef7aab2cd46a4c9f0530cc9f3","head":{"label":"nipunn1313:privateheader","ref":"privateheader","sha":"d05a504285a5c69ef7aab2cd46a4c9f0530cc9f3","user":{"login":"nipunn1313","id":1300387,"avatar_url":"https://avatars.githubusercontent.com/u/1300387?v=3","gravatar_id":"","url":"https://api.github.com/users/nipunn1313","html_url":"https://github.com/nipunn1313","followers_url":"https://api.github.com/users/nipunn1313/followers","following_url":"https://api.github.com/users/nipunn1313/following{/other_user}","gists_url":"https://api.github.com/users/nipunn1313/gists{/gist_id}","starred_url":"https://api.github.com/users/nipunn1313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipunn1313/subscriptions","organizations_url":"https://api.github.com/users/nipunn1313/orgs","repos_url":"https://api.github.com/users/nipunn1313/repos","events_url":"https://api.github.com/users/nipunn1313/events{/privacy}","received_events_url":"https://api.github.com/users/nipunn1313/received_events","type":"User","site_admin":false},"repo":{"id":62439810,"name":"parity","full_name":"nipunn1313/parity","owner":{"login":"nipunn1313","id":1300387,"avatar_url":"https://avatars.githubusercontent.com/u/1300387?v=3","gravatar_id":"","url":"https://api.github.com/users/nipunn1313","html_url":"https://github.com/nipunn1313","followers_url":"https://api.github.com/users/nipunn1313/followers","following_url":"https://api.github.com/users/nipunn1313/following{/other_user}","gists_url":"https://api.github.com/users/nipunn1313/gists{/gist_id}","starred_url":"https://api.github.com/users/nipunn1313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipunn1313/subscriptions","organizations_url":"https://api.github.com/users/nipunn1313/orgs","repos_url":"https://api.github.com/users/nipunn1313/repos","events_url":"https://api.github.com/users/nipunn1313/events{/privacy}","received_events_url":"https://api.github.com/users/nipunn1313/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nipunn1313/parity","description":"Fast, light, robust Ethereum implementation","fork":true,"url":"https://api.github.com/repos/nipunn1313/parity","forks_url":"https://api.github.com/repos/nipunn1313/parity/forks","keys_url":"https://api.github.com/repos/nipunn1313/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nipunn1313/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nipunn1313/parity/teams","hooks_url":"https://api.github.com/repos/nipunn1313/parity/hooks","issue_events_url":"https://api.github.com/repos/nipunn1313/parity/issues/events{/number}","events_url":"https://api.github.com/repos/nipunn1313/parity/events","assignees_url":"https://api.github.com/repos/nipunn1313/parity/assignees{/user}","branches_url":"https://api.github.com/repos/nipunn1313/parity/branches{/branch}","tags_url":"https://api.github.com/repos/nipunn1313/parity/tags","blobs_url":"https://api.github.com/repos/nipunn1313/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nipunn1313/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nipunn1313/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/nipunn1313/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nipunn1313/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/nipunn1313/parity/languages","stargazers_url":"https://api.github.com/repos/nipunn1313/parity/stargazers","contributors_url":"https://api.github.com/repos/nipunn1313/parity/contributors","subscribers_url":"https://api.github.com/repos/nipunn1313/parity/subscribers","subscription_url":"https://api.github.com/repos/nipunn1313/parity/subscription","commits_url":"https://api.github.com/repos/nipunn1313/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/nipunn1313/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/nipunn1313/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/nipunn1313/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/nipunn1313/parity/contents/{+path}","compare_url":"https://api.github.com/repos/nipunn1313/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nipunn1313/parity/merges","archive_url":"https://api.github.com/repos/nipunn1313/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nipunn1313/parity/downloads","issues_url":"https://api.github.com/repos/nipunn1313/parity/issues{/number}","pulls_url":"https://api.github.com/repos/nipunn1313/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/nipunn1313/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/nipunn1313/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nipunn1313/parity/labels{/name}","releases_url":"https://api.github.com/repos/nipunn1313/parity/releases{/id}","deployments_url":"https://api.github.com/repos/nipunn1313/parity/deployments","created_at":"2016-07-02T07:36:42Z","updated_at":"2016-07-02T07:36:45Z","pushed_at":"2016-08-24T16:58:31Z","git_url":"git://github.com/nipunn1313/parity.git","ssh_url":"git@github.com:nipunn1313/parity.git","clone_url":"https://github.com/nipunn1313/parity.git","svn_url":"https://github.com/nipunn1313/parity","homepage":"","size":13899,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"ethcore:master","ref":"master","sha":"f6b8dd0e781c1de37656cada098c156e65a01569","user":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"repo":{"id":46714939,"name":"parity","full_name":"ethcore/parity","owner":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethcore/parity","description":"Fast, light, robust Ethereum implementation","fork":false,"url":"https://api.github.com/repos/ethcore/parity","forks_url":"https://api.github.com/repos/ethcore/parity/forks","keys_url":"https://api.github.com/repos/ethcore/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethcore/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethcore/parity/teams","hooks_url":"https://api.github.com/repos/ethcore/parity/hooks","issue_events_url":"https://api.github.com/repos/ethcore/parity/issues/events{/number}","events_url":"https://api.github.com/repos/ethcore/parity/events","assignees_url":"https://api.github.com/repos/ethcore/parity/assignees{/user}","branches_url":"https://api.github.com/repos/ethcore/parity/branches{/branch}","tags_url":"https://api.github.com/repos/ethcore/parity/tags","blobs_url":"https://api.github.com/repos/ethcore/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethcore/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethcore/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethcore/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethcore/parity/languages","stargazers_url":"https://api.github.com/repos/ethcore/parity/stargazers","contributors_url":"https://api.github.com/repos/ethcore/parity/contributors","subscribers_url":"https://api.github.com/repos/ethcore/parity/subscribers","subscription_url":"https://api.github.com/repos/ethcore/parity/subscription","commits_url":"https://api.github.com/repos/ethcore/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethcore/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethcore/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethcore/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethcore/parity/contents/{+path}","compare_url":"https://api.github.com/repos/ethcore/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethcore/parity/merges","archive_url":"https://api.github.com/repos/ethcore/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethcore/parity/downloads","issues_url":"https://api.github.com/repos/ethcore/parity/issues{/number}","pulls_url":"https://api.github.com/repos/ethcore/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethcore/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethcore/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethcore/parity/labels{/name}","releases_url":"https://api.github.com/repos/ethcore/parity/releases{/id}","deployments_url":"https://api.github.com/repos/ethcore/parity/deployments","created_at":"2015-11-23T11:07:32Z","updated_at":"2016-08-24T21:09:46Z","pushed_at":"2016-08-25T08:33:18Z","git_url":"git://github.com/ethcore/parity.git","ssh_url":"git@github.com:ethcore/parity.git","clone_url":"https://github.com/ethcore/parity.git","svn_url":"https://github.com/ethcore/parity","homepage":"","size":27409,"stargazers_count":488,"watchers_count":488,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":82,"mirror_url":null,"open_issues_count":101,"forks":82,"open_issues":101,"watchers":488,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2000"},"html":{"href":"https://github.com/ethcore/parity/pull/2000"},"issue":{"href":"https://api.github.com/repos/ethcore/parity/issues/2000"},"comments":{"href":"https://api.github.com/repos/ethcore/parity/issues/2000/comments"},"review_comments":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2000/comments"},"review_comment":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2000/commits"},"statuses":{"href":"https://api.github.com/repos/ethcore/parity/statuses/d05a504285a5c69ef7aab2cd46a4c9f0530cc9f3"}}}}
{"actor":{"display_login":"rphmeier"}}