entity

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2020 License: AGPL-3.0 Imports: 1 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlocksByCollection

type BlocksByCollection struct {
	CollectionID     flow.Identifier
	ExecutableBlocks map[flow.Identifier]*ExecutableBlock
}

func (*BlocksByCollection) Checksum

func (b *BlocksByCollection) Checksum() flow.Identifier

func (*BlocksByCollection) ID

type CompleteCollection

type CompleteCollection struct {
	Guarantee    *flow.CollectionGuarantee
	Transactions []*flow.TransactionBody
}

func (*CompleteCollection) Collection

func (c *CompleteCollection) Collection() flow.Collection

type ExecutableBlock

type ExecutableBlock struct {
	Block               *flow.Block
	CompleteCollections map[flow.Identifier]*CompleteCollection
	StartState          flow.StateCommitment
	// contains filtered or unexported fields
}

ExecutableBlock represents a block that can be executed by the VM

It assumes that the Block attached is immutable, so take care in not modifying or changing the inner *flow.Block, otherwise the struct will be in an inconsistent state. It requires the Block is immutable because the it lazy lodas the Block.ID() into the private id field, on the first call to ExecutableBlock.ID() All future calls to ID will not call Block.ID(), therefore it Block changes, the id will not match the Block.

func (*ExecutableBlock) Checksum

func (b *ExecutableBlock) Checksum() flow.Identifier

func (*ExecutableBlock) Collections

func (b *ExecutableBlock) Collections() []*CompleteCollection

func (*ExecutableBlock) HasAllTransactions

func (b *ExecutableBlock) HasAllTransactions() bool

func (*ExecutableBlock) Height

func (b *ExecutableBlock) Height() uint64

func (*ExecutableBlock) ID

ID lazy loads the Block.ID() into the private id field on the first call, and returns the id field in all future calls

func (*ExecutableBlock) IsComplete

func (b *ExecutableBlock) IsComplete() bool

func (*ExecutableBlock) ParentID

func (b *ExecutableBlock) ParentID() flow.Identifier

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL