Skip to content

qkc/types: add root and minor blocks - #36

Open
blockchaindevsh wants to merge 3 commits into
qkc-3-types-04-transactionsfrom
qkc-3-types-05-blocks
Open

qkc/types: add root and minor blocks#36
blockchaindevsh wants to merge 3 commits into
qkc-3-types-04-transactionsfrom
qkc-3-types-05-blocks

Conversation

@blockchaindevsh

Copy link
Copy Markdown

5th PR of QuarkChain/pm#155.

Comment thread qkc/types/rootblock.go Outdated
CoinbaseAmount *TokenBalances `json:"coinbaseAmount" gencodec:"required"`
Time uint64 `json:"timestamp" gencodec:"required"`
Difficulty *big.Int `json:"difficulty" gencodec:"required"`
ToTalDifficulty *big.Int `json:"total_difficulty" gencodec:"required"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ToTal" not "Total"?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f952bd7.

Comment thread qkc/types/rootblock.go Outdated
// Hash returns the block hash of the header, which is simply the keccak256 hash of its
// Serialize encoding.
func (h *RootBlockHeader) Hash() common.Hash {
//return serHash(*h, map[string]bool{"Signature": true})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented-out hash implementation is confusing. Is there any reason to keep this old Signature-excluded version here? If not, could we remove it to avoid ambiguity?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f26ebbe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants