layers

package
v0.2.12-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAggregatedHash

func GetAggregatedHash(db sql.Executor, lid types.LayerID) (types.Hash32, error)

GetAggregatedHash for layer.

func GetByStatus

func GetByStatus(db sql.Executor, status Status) (rst types.LayerID, err error)

GetByStatus return latest layer with the status.

func GetHareOutput

func GetHareOutput(db sql.Executor, lid types.LayerID) (rst types.BlockID, err error)

GetHareOutput for layer.

func GetHash

func GetHash(db sql.Executor, lid types.LayerID) (types.Hash32, error)

GetHash for layer.

func SetAggregatedHash

func SetAggregatedHash(db sql.Executor, lid types.LayerID, hash types.Hash32) error

SetAggregatedHash updates aggregated hash for layer.

func SetHareOutput

func SetHareOutput(db sql.Executor, lid types.LayerID, output types.BlockID) error

SetHareOutput for the layer to a block id.

func SetHash

func SetHash(db sql.Executor, lid types.LayerID, hash types.Hash32) error

SetHash updates hash for layer.

func SetStatus

func SetStatus(db sql.Executor, lid types.LayerID, status Status) error

SetStatus updates status of the layer.

Types

type Status

type Status int8

Status of the layer.

const (
	// Latest layer that was added to db.
	Latest Status = iota
	// Processed layer is either synced from peers or updated by hare.
	Processed
	// Applied layer to the state.
	Applied
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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