blockdao

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 19 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDAO

type BlockDAO interface {
	filedao.FileDAO
	GetActionByActionHash(hash.Hash256, uint64) (action.SealedEnvelope, uint32, error)
	GetReceiptByActionHash(hash.Hash256, uint64) (*action.Receipt, error)
	DeleteBlockToTarget(uint64) error
}

BlockDAO represents the block data access object

func NewBlockDAO

func NewBlockDAO(indexers []BlockIndexer, cfg db.Config) BlockDAO

NewBlockDAO instantiates a block DAO

func NewBlockDAOInMemForTest added in v1.1.2

func NewBlockDAOInMemForTest(indexers []BlockIndexer) BlockDAO

NewBlockDAOInMemForTest creates a in-memory block DAO for testing

type BlockIndexer added in v0.11.0

type BlockIndexer interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Height() (uint64, error)
	PutBlock(context.Context, *block.Block) error
	DeleteTipBlock(blk *block.Block) error
}

BlockIndexer defines an interface to accept block to build index

Jump to

Keyboard shortcuts

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