database

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStoreStateJSON

type BlockStoreStateJSON struct {
	Height uint64
	Hash   *bc.Hash
}

BlockStoreStateJSON represents the core's db status

type Store

type Store interface {
	BlockExist(*bc.Hash) bool

	GetBlock(*bc.Hash) (*types.Block, error)
	GetBlockHeader(*bc.Hash) (*types.BlockHeader, error)
	GetMainchain(*bc.Hash) (map[uint64]*bc.Hash, error)
	GetStoreStatus() BlockStoreStateJSON
	GetSeed(*bc.Hash) (*bc.Hash, error)
	GetTransactionStatus(*bc.Hash) (*bc.TransactionStatus, error)
	GetTransactionsUtxo(*state.UtxoViewpoint, []*bc.Tx) error
	GetUtxo(*bc.Hash) (*storage.UtxoEntry, error)

	SaveBlock(*types.Block, *bc.TransactionStatus, *bc.Hash) error
	SaveChainStatus(*types.Block, *state.UtxoViewpoint, map[uint64]*bc.Hash) error
}

Store provides storage interface for blockchain data

Directories

Path Synopsis
Package storage is a generated protocol buffer package.
Package storage is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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