You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
497 B

7 years ago
7 years ago
  1. package types
  2. // BlockMeta contains meta information about a block - namely, it's ID and Header.
  3. type BlockMeta struct {
  4. BlockID BlockID `json:"block_id"` // the block hash and partsethash
  5. Header Header `json:"header"` // The block's Header
  6. }
  7. // NewBlockMeta returns a new BlockMeta from the block and its blockParts.
  8. func NewBlockMeta(block *Block, blockParts *PartSet) *BlockMeta {
  9. return &BlockMeta{
  10. BlockID: BlockID{block.Hash(), blockParts.Header()},
  11. Header: block.Header,
  12. }
  13. }