state

package
v0.0.0-...-1d8d417 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockState

type BlockState interface {
	GetBlock(blkID ids.ID) (block.Block, choices.Status, error)
	PutBlock(blk block.Block, status choices.Status) error
	DeleteBlock(blkID ids.ID) error
	// contains filtered or unexported methods
}

func NewBlockState

func NewBlockState(db database.Database) BlockState

func NewMeteredBlockState

func NewMeteredBlockState(db database.Database, namespace string, metrics prometheus.Registerer) (BlockState, error)

type ChainState

type ChainState interface {
	SetLastAccepted(blkID ids.ID) error
	DeleteLastAccepted() error
	GetLastAccepted() (ids.ID, error)
	// contains filtered or unexported methods
}

func NewChainState

func NewChainState(db database.Database) ChainState

type State

type State interface {
	ChainState
	BlockState
}

func New

func New(db database.Database) State

func NewMetered

func NewMetered(db database.Database, namespace string, metrics prometheus.Registerer) (State, error)

Jump to

Keyboard shortcuts

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