layers

package
v1.4.4-alpha.0-nomainnet Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstAppliedInEpoch added in v1.1.10

func FirstAppliedInEpoch(db sql.Executor, epoch types.EpochID) (types.BlockID, error)

func GetAggHashes

func GetAggHashes(db sql.Executor, from, to types.LayerID, by uint32) (hashes []types.Hash32, err error)

func GetAggregatedHash

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

GetAggregatedHash for layer.

func GetApplied

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

GetApplied for the applied block for layer.

func GetLastApplied

func GetLastApplied(db sql.Executor) (types.LayerID, error)

GetLastApplied for the applied block for layer.

func GetLatestStateHash

func GetLatestStateHash(db sql.Executor) (rst types.Hash32, err error)

GetLatestStateHash loads latest state hash.

func GetProcessed

func GetProcessed(db sql.Executor) (types.LayerID, error)

GetProcessed gets the highest layer processed.

func GetStateHash

func GetStateHash(db sql.Executor, lid types.LayerID) (rst types.Hash32, err error)

GetStateHash loads state hash for the layer.

func GetWeakCoin

func GetWeakCoin(db sql.Executor, lid types.LayerID) (bool, error)

GetWeakCoin for layer.

func IterateAggHashes added in v1.4.1

func IterateAggHashes(
	db sql.Executor,
	from, to types.LayerID,
	by uint32,
	callback func(total int, id types.Hash32) error,
) error

func SetApplied

func SetApplied(db sql.Executor, lid types.LayerID, applied types.BlockID) error

SetApplied for the layer to a block id.

func SetMeshHash

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

SetMeshHash sets the aggregated hash up to the specified layer.

func SetProcessed

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

SetProcessed sets a layer processed.

func SetWeakCoin

func SetWeakCoin(db sql.Executor, lid types.LayerID, weakcoin bool) error

SetWeakCoin for the layer.

func UnsetAppliedFrom

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

UnsetAppliedFrom updates the applied block to nil for layer >= `lid`.

func UpdateStateHash

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

UpdateStateHash for the layer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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