github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/state/block.go (about)

     1  package state
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/ethereum/go-ethereum/common"
     7  )
     8  
     9  // Block struct
    10  type Block struct {
    11  	BlockNumber uint64
    12  	BlockHash   common.Hash
    13  	ParentHash  common.Hash
    14  	ReceivedAt  time.Time
    15  }
    16  
    17  // NewBlock creates a block with the given data.
    18  func NewBlock(blockNumber uint64) *Block {
    19  	return &Block{BlockNumber: blockNumber}
    20  }