blocks

package
v0.2.12-beta-0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 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 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 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