{"action":"created","comment":{"url":"https://api.github.com/repos/decred/dcrd/pulls/comments/86823512","pull_request_review_id":7457856,"id":86823512,"diff_hunk":"@@ -1645,23 +1645,24 @@ func (g *testGenerator) nextBlock(blockName string, spend *spendableOut, ticketS\n \t// Create the unsolved block.\n \tblock := wire.MsgBlock{\n \t\tHeader: wire.BlockHeader{\n-\t\t\tVersion:     1,\n-\t\t\tPrevBlock:   g.tip.BlockSha(),\n-\t\t\tMerkleRoot:  calcMerkleRoot(regularTxns),\n-\t\t\tStakeRoot:   calcMerkleRoot(stakeTxns),\n-\t\t\tVoteBits:    1,\n-\t\t\tFinalState:  finalState,\n-\t\t\tVoters:      numVotes,\n-\t\t\tFreshStake:  numTicketPurchases,\n-\t\t\tRevocations: numTicketRevocations,\n-\t\t\tPoolSize:    uint32(len(liveTickets)),\n-\t\t\tBits:        g.calcNextRequiredDifficulty(),\n-\t\t\tSBits:       int64(ticketPrice),\n-\t\t\tHeight:      nextHeight,\n-\t\t\tSize:        0, // Filled in below.\n-\t\t\tTimestamp:   ts,\n-\t\t\tNonce:       0, // To be solved.\n-\t\t\tExtraData:   [36]byte{},\n+\t\t\tVersion:      1,\n+\t\t\tPrevBlock:    g.tip.BlockSha(),\n+\t\t\tMerkleRoot:   calcMerkleRoot(regularTxns),\n+\t\t\tStakeRoot:    calcMerkleRoot(stakeTxns),\n+\t\t\tVoteBits:     1,\n+\t\t\tFinalState:   finalState,\n+\t\t\tVoters:       numVotes,\n+\t\t\tFreshStake:   numTicketPurchases,\n+\t\t\tRevocations:  numTicketRevocations,\n+\t\t\tPoolSize:     uint32(len(liveTickets)),\n+\t\t\tBits:         g.calcNextRequiredDifficulty(),\n+\t\t\tSBits:        int64(ticketPrice),\n+\t\t\tHeight:       nextHeight,\n+\t\t\tSize:         0, // Filled in below.\n+\t\t\tTimestamp:    ts,\n+\t\t\tNonce:        0, // To be solved.\n+\t\t\tExtraData:    [32]byte{},\n+\t\t\tStakeVersion: uint32(0),","path":"blockchain/fullblocktests/generate.go","position":38,"original_position":38,"commit_id":"73d4254732328b8f6048952ead3b2a6e8d146b8e","original_commit_id":"73d4254732328b8f6048952ead3b2a6e8d146b8e","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":"No need to cast this.  I realize that some of the other test code below also _incorrectly_ casts things that don't need to be cast, but those tests are self-consistent, so they're acceptable.\r\n\r\nHowever, nothing in this case is casting things that don't need to be (see the `VoteBits`, `Size`, `Nonce`, etc fields), so this should not either.  The entire Decred codebase needs `unconvert` run on it and have all of those unnecessary casts removed.","created_at":"2016-11-07T17:22:06Z","updated_at":"2016-11-07T17:25:39Z","html_url":"https://github.com/decred/dcrd/pull/441#discussion_r86823512","pull_request_url":"https://api.github.com/repos/decred/dcrd/pulls/441","_links":{"self":{"href":"https://api.github.com/repos/decred/dcrd/pulls/comments/86823512"},"html":{"href":"https://github.com/decred/dcrd/pull/441#discussion_r86823512"},"pull_request":{"href":"https://api.github.com/repos/decred/dcrd/pulls/441"}}},"pull_request":{"url":"https://api.github.com/repos/decred/dcrd/pulls/441","id":92620536,"html_url":"https://github.com/decred/dcrd/pull/441","diff_url":"https://github.com/decred/dcrd/pull/441.diff","patch_url":"https://github.com/decred/dcrd/pull/441.patch","issue_url":"https://api.github.com/repos/decred/dcrd/issues/441","number":441,"state":"open","locked":false,"title":"Add StakeVersion to header.","user":{"login":"marcopeereboom","id":4366787,"avatar_url":"https://avatars.githubusercontent.com/u/4366787?v=3","gravatar_id":"","url":"https://api.github.com/users/marcopeereboom","html_url":"https://github.com/marcopeereboom","followers_url":"https://api.github.com/users/marcopeereboom/followers","following_url":"https://api.github.com/users/marcopeereboom/following{/other_user}","gists_url":"https://api.github.com/users/marcopeereboom/gists{/gist_id}","starred_url":"https://api.github.com/users/marcopeereboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcopeereboom/subscriptions","organizations_url":"https://api.github.com/users/marcopeereboom/orgs","repos_url":"https://api.github.com/users/marcopeereboom/repos","events_url":"https://api.github.com/users/marcopeereboom/events{/privacy}","received_events_url":"https://api.github.com/users/marcopeereboom/received_events","type":"User","site_admin":false},"body":"This adds StakeVersion to the block header and bumps the block version to 2 (equalizing sim and test net versions as well).  This code does not react in any way shape or form to StakeVersion.  Despite the fact that we don't react to the StakeVersion changes we have to bump the block version because the wire format did change.  The idea is to bump the block header version one more time when StakeVersion is going to be interpreted and acted upon. \r\n\r\nFixes #435 ","created_at":"2016-11-07T16:50:43Z","updated_at":"2016-11-07T17:43:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d9002ec8a2c8a6cbf267a635b5861aabef40800","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/decred/dcrd/pulls/441/commits","review_comments_url":"https://api.github.com/repos/decred/dcrd/pulls/441/comments","review_comment_url":"https://api.github.com/repos/decred/dcrd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/decred/dcrd/issues/441/comments","statuses_url":"https://api.github.com/repos/decred/dcrd/statuses/73d4254732328b8f6048952ead3b2a6e8d146b8e","head":{"label":"marcopeereboom:stakeversion2","ref":"stakeversion2","sha":"73d4254732328b8f6048952ead3b2a6e8d146b8e","user":{"login":"marcopeereboom","id":4366787,"avatar_url":"https://avatars.githubusercontent.com/u/4366787?v=3","gravatar_id":"","url":"https://api.github.com/users/marcopeereboom","html_url":"https://github.com/marcopeereboom","followers_url":"https://api.github.com/users/marcopeereboom/followers","following_url":"https://api.github.com/users/marcopeereboom/following{/other_user}","gists_url":"https://api.github.com/users/marcopeereboom/gists{/gist_id}","starred_url":"https://api.github.com/users/marcopeereboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcopeereboom/subscriptions","organizations_url":"https://api.github.com/users/marcopeereboom/orgs","repos_url":"https://api.github.com/users/marcopeereboom/repos","events_url":"https://api.github.com/users/marcopeereboom/events{/privacy}","received_events_url":"https://api.github.com/users/marcopeereboom/received_events","type":"User","site_admin":false},"repo":{"id":60284076,"name":"dcrd","full_name":"marcopeereboom/dcrd","owner":{"login":"marcopeereboom","id":4366787,"avatar_url":"https://avatars.githubusercontent.com/u/4366787?v=3","gravatar_id":"","url":"https://api.github.com/users/marcopeereboom","html_url":"https://github.com/marcopeereboom","followers_url":"https://api.github.com/users/marcopeereboom/followers","following_url":"https://api.github.com/users/marcopeereboom/following{/other_user}","gists_url":"https://api.github.com/users/marcopeereboom/gists{/gist_id}","starred_url":"https://api.github.com/users/marcopeereboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcopeereboom/subscriptions","organizations_url":"https://api.github.com/users/marcopeereboom/orgs","repos_url":"https://api.github.com/users/marcopeereboom/repos","events_url":"https://api.github.com/users/marcopeereboom/events{/privacy}","received_events_url":"https://api.github.com/users/marcopeereboom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marcopeereboom/dcrd","description":"Decred daemon in Go (golang)","fork":true,"url":"https://api.github.com/repos/marcopeereboom/dcrd","forks_url":"https://api.github.com/repos/marcopeereboom/dcrd/forks","keys_url":"https://api.github.com/repos/marcopeereboom/dcrd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marcopeereboom/dcrd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marcopeereboom/dcrd/teams","hooks_url":"https://api.github.com/repos/marcopeereboom/dcrd/hooks","issue_events_url":"https://api.github.com/repos/marcopeereboom/dcrd/issues/events{/number}","events_url":"https://api.github.com/repos/marcopeereboom/dcrd/events","assignees_url":"https://api.github.com/repos/marcopeereboom/dcrd/assignees{/user}","branches_url":"https://api.github.com/repos/marcopeereboom/dcrd/branches{/branch}","tags_url":"https://api.github.com/repos/marcopeereboom/dcrd/tags","blobs_url":"https://api.github.com/repos/marcopeereboom/dcrd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marcopeereboom/dcrd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marcopeereboom/dcrd/git/refs{/sha}","trees_url":"https://api.github.com/repos/marcopeereboom/dcrd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marcopeereboom/dcrd/statuses/{sha}","languages_url":"https://api.github.com/repos/marcopeereboom/dcrd/languages","stargazers_url":"https://api.github.com/repos/marcopeereboom/dcrd/stargazers","contributors_url":"https://api.github.com/repos/marcopeereboom/dcrd/contributors","subscribers_url":"https://api.github.com/repos/marcopeereboom/dcrd/subscribers","subscription_url":"https://api.github.com/repos/marcopeereboom/dcrd/subscription","commits_url":"https://api.github.com/repos/marcopeereboom/dcrd/commits{/sha}","git_commits_url":"https://api.github.com/repos/marcopeereboom/dcrd/git/commits{/sha}","comments_url":"https://api.github.com/repos/marcopeereboom/dcrd/comments{/number}","issue_comment_url":"https://api.github.com/repos/marcopeereboom/dcrd/issues/comments{/number}","contents_url":"https://api.github.com/repos/marcopeereboom/dcrd/contents/{+path}","compare_url":"https://api.github.com/repos/marcopeereboom/dcrd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marcopeereboom/dcrd/merges","archive_url":"https://api.github.com/repos/marcopeereboom/dcrd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marcopeereboom/dcrd/downloads","issues_url":"https://api.github.com/repos/marcopeereboom/dcrd/issues{/number}","pulls_url":"https://api.github.com/repos/marcopeereboom/dcrd/pulls{/number}","milestones_url":"https://api.github.com/repos/marcopeereboom/dcrd/milestones{/number}","notifications_url":"https://api.github.com/repos/marcopeereboom/dcrd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marcopeereboom/dcrd/labels{/name}","releases_url":"https://api.github.com/repos/marcopeereboom/dcrd/releases{/id}","deployments_url":"https://api.github.com/repos/marcopeereboom/dcrd/deployments","created_at":"2016-06-02T17:33:13Z","updated_at":"2016-06-02T17:33:16Z","pushed_at":"2016-11-07T16:45:21Z","git_url":"git://github.com/marcopeereboom/dcrd.git","ssh_url":"git@github.com:marcopeereboom/dcrd.git","clone_url":"https://github.com/marcopeereboom/dcrd.git","svn_url":"https://github.com/marcopeereboom/dcrd","homepage":"https://decred.org","size":17873,"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":"decred:master","ref":"master","sha":"409005c9f8797d4e91222831d6ea387f6854dbb8","user":{"login":"decred","id":16297194,"avatar_url":"https://avatars.githubusercontent.com/u/16297194?v=3","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"repo":{"id":50457080,"name":"dcrd","full_name":"decred/dcrd","owner":{"login":"decred","id":16297194,"avatar_url":"https://avatars.githubusercontent.com/u/16297194?v=3","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/decred/dcrd","description":"Decred daemon in Go (golang)","fork":true,"url":"https://api.github.com/repos/decred/dcrd","forks_url":"https://api.github.com/repos/decred/dcrd/forks","keys_url":"https://api.github.com/repos/decred/dcrd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/decred/dcrd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/decred/dcrd/teams","hooks_url":"https://api.github.com/repos/decred/dcrd/hooks","issue_events_url":"https://api.github.com/repos/decred/dcrd/issues/events{/number}","events_url":"https://api.github.com/repos/decred/dcrd/events","assignees_url":"https://api.github.com/repos/decred/dcrd/assignees{/user}","branches_url":"https://api.github.com/repos/decred/dcrd/branches{/branch}","tags_url":"https://api.github.com/repos/decred/dcrd/tags","blobs_url":"https://api.github.com/repos/decred/dcrd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/decred/dcrd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/decred/dcrd/git/refs{/sha}","trees_url":"https://api.github.com/repos/decred/dcrd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/decred/dcrd/statuses/{sha}","languages_url":"https://api.github.com/repos/decred/dcrd/languages","stargazers_url":"https://api.github.com/repos/decred/dcrd/stargazers","contributors_url":"https://api.github.com/repos/decred/dcrd/contributors","subscribers_url":"https://api.github.com/repos/decred/dcrd/subscribers","subscription_url":"https://api.github.com/repos/decred/dcrd/subscription","commits_url":"https://api.github.com/repos/decred/dcrd/commits{/sha}","git_commits_url":"https://api.github.com/repos/decred/dcrd/git/commits{/sha}","comments_url":"https://api.github.com/repos/decred/dcrd/comments{/number}","issue_comment_url":"https://api.github.com/repos/decred/dcrd/issues/comments{/number}","contents_url":"https://api.github.com/repos/decred/dcrd/contents/{+path}","compare_url":"https://api.github.com/repos/decred/dcrd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/decred/dcrd/merges","archive_url":"https://api.github.com/repos/decred/dcrd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/decred/dcrd/downloads","issues_url":"https://api.github.com/repos/decred/dcrd/issues{/number}","pulls_url":"https://api.github.com/repos/decred/dcrd/pulls{/number}","milestones_url":"https://api.github.com/repos/decred/dcrd/milestones{/number}","notifications_url":"https://api.github.com/repos/decred/dcrd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/decred/dcrd/labels{/name}","releases_url":"https://api.github.com/repos/decred/dcrd/releases{/id}","deployments_url":"https://api.github.com/repos/decred/dcrd/deployments","created_at":"2016-01-26T20:28:42Z","updated_at":"2016-10-29T16:44:36Z","pushed_at":"2016-11-07T16:50:43Z","git_url":"git://github.com/decred/dcrd.git","ssh_url":"git@github.com:decred/dcrd.git","clone_url":"https://github.com/decred/dcrd.git","svn_url":"https://github.com/decred/dcrd","homepage":"https://decred.org","size":18452,"stargazers_count":48,"watchers_count":48,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":53,"forks":20,"open_issues":53,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/decred/dcrd/pulls/441"},"html":{"href":"https://github.com/decred/dcrd/pull/441"},"issue":{"href":"https://api.github.com/repos/decred/dcrd/issues/441"},"comments":{"href":"https://api.github.com/repos/decred/dcrd/issues/441/comments"},"review_comments":{"href":"https://api.github.com/repos/decred/dcrd/pulls/441/comments"},"review_comment":{"href":"https://api.github.com/repos/decred/dcrd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/decred/dcrd/pulls/441/commits"},"statuses":{"href":"https://api.github.com/repos/decred/dcrd/statuses/73d4254732328b8f6048952ead3b2a6e8d146b8e"}}}}
{"actor":{"display_login":"davecgh"}}