Documentation ¶
Index ¶
Constants ¶
View Source
const BlockStoreLatestBlockMetaKey = "LatestBlockMeta"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks struct {
// contains filtered or unexported fields
}
Blocks facilitates access to the recent block hash values and also the latest executed block meta data
func NewBlocks ¶
func NewBlocks( chainID flow.ChainID, rootAddress flow.Address, storage types.BackendStorage, ) (*Blocks, error)
NewBlocks constructs a new blocks type
func (*Blocks) BlockHash ¶
func (b *Blocks) BlockHash(height uint64) (gethCommon.Hash, error)
BlockHash returns the block hash for the given height
func (*Blocks) LatestBlock ¶
func (*Blocks) PushBlockHash ¶
func (b *Blocks) PushBlockHash( height uint64, hash gethCommon.Hash, ) error
PushBlockHash pushes a new block block hash into the storage
func (*Blocks) PushBlockMeta ¶
PushBlock pushes a new block into the storage
type Meta ¶
type Meta struct { Height uint64 Timestamp uint64 Random gethCommon.Hash }
Meta holds meta data about a block
func MetaFromEncoded ¶
MetaFromEncoded constructs a Meta from encoded data
Click to show internal directories.
Click to hide internal directories.