model

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 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 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.

Jump to

Keyboard shortcuts

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