model

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalMapEntity added in v0.9.6

type ApprovalMapEntity struct {
	ChunkKey   flow.Identifier
	ResultID   flow.Identifier
	ChunkIndex uint64
	Approvals  map[flow.Identifier]*flow.ResultApproval // [approver_id] => approval
}

ApprovalMapEntity is an internal data structure for the approval mempool. It implements a key-value entry where a chunk is associated with a map of approvals indexed by approver ID.

func (*ApprovalMapEntity) Checksum added in v0.9.6

func (a *ApprovalMapEntity) Checksum() flow.Identifier

CheckSum implements flow.Entity.CheckSum for ApprovalMapEntity to make it capable of being stored directly in mempools and storage. It makes the id of the entire ApprovalMapEntity.

func (*ApprovalMapEntity) ID added in v0.9.6

ID implements flow.Entity.ID for ApprovalMapEntity to make it capable of being stored directly in mempools and storage.

type IdEntity

type IdEntity struct {
	Id flow.Identifier
}

IdEntity is an internal data structure for mempool It implements a wrapper around the original flow Identifier which represents it as a flow Entity that allows the identifier to directly gets stored in the mempool

func (IdEntity) Checksum

func (id IdEntity) Checksum() flow.Identifier

ID implements flow.Entity.ID for Identifier to make it capable of being stored directly in mempools and storage ID returns checksum of identifier

func (IdEntity) ID

func (id IdEntity) ID() flow.Identifier

ID implements flow.Entity.ID for Identifier to make it capable of being stored directly in mempools and storage ID returns the identifier itself

type IdMapEntity

type IdMapEntity struct {
	Key flow.Identifier
	IDs map[flow.Identifier]struct{}
}

IdMapEntity is an internal data structure for mempool It implements a key-value entry where an identifier is mapped to a list of other identifiers.

func (IdMapEntity) Checksum

func (id IdMapEntity) Checksum() flow.Identifier

CheckSum implements flow.Entity.CheckSum for IdMapEntity to make it capable of being stored directly in mempools and storage. It makes the id of the entire IdMapEntity.

func (IdMapEntity) ID

func (id IdMapEntity) ID() flow.Identifier

ID implements flow.Entity.ID for IdMapEntity to make it capable of being stored directly in mempools and storage. It returns key field of the id.

type IncorporatedResultMap added in v0.11.0

type IncorporatedResultMap struct {
	ExecutionResult     *flow.ExecutionResult
	IncorporatedResults map[flow.Identifier]*flow.IncorporatedResult // [incorporated block ID] => IncorporatedResult
}

IncorporatedResultMap is an internal data structure for the incorporated results mempool. IncorporatedResults are indexed by ExecutionResult ID and IncorporatedBlockID

func (*IncorporatedResultMap) Checksum added in v0.11.0

func (a *IncorporatedResultMap) Checksum() flow.Identifier

CheckSum implements flow.Entity.CheckSum for IncorporatedResultMap to make it capable of being stored directly in mempools and storage. It makes the id of the entire IncorporatedResultMap.

func (*IncorporatedResultMap) ID added in v0.11.0

ID implements flow.Entity.ID for IncorporatedResultMap to make it capable of being stored directly in mempools and storage.

Jump to

Keyboard shortcuts

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