OSDN Git Service

merge node_p2p and chain.
[bytom/bytom.git] / types / block_meta.go
1 package types
2
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
8 func NewBlockMeta(block *Block, blockParts *PartSet) *BlockMeta {
9         return &BlockMeta{
10                 BlockID: BlockID{block.Hash(), blockParts.Header()},
11                 Header:  block.Header,
12         }
13 }