blocks

package
v0.2.15-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db sql.Executor, block *types.Block) error

Add block to the database.

func ContextualValidity

func ContextualValidity(db sql.Executor, lid types.LayerID) ([]types.BlockContextualValidity, error)

ContextualValidity returns tuples with block id and contextual validity for all blocks in the layer.

func Get

func Get(db sql.Executor, id types.BlockID) (rst *types.Block, err error)

Get block with id from database.

func Has

func Has(db sql.Executor, id types.BlockID) (bool, error)

Has a block in the database.

func IDsInLayer

func IDsInLayer(db sql.Executor, lid types.LayerID) ([]types.BlockID, error)

IDsInLayer returns list of block ids in the layer.

func IsValid

func IsValid(db sql.Executor, id types.BlockID) (rst bool, err error)

IsValid returns true if block is verified.

func Layer

func Layer(db sql.Executor, id types.BlockID) (types.LayerID, error)

Layer returns the layer of a block.

func SetInvalid

func SetInvalid(db sql.Executor, id types.BlockID) error

SetInvalid updates blocks to an invalid status.

func SetValid

func SetValid(db sql.Executor, id types.BlockID) error

SetValid updates verified status for a block.

Types

This section is empty.

Jump to

Keyboard shortcuts

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