historykvdb

package
v0.0.0-...-8b03266 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryKvDB

type HistoryKvDB struct {
	// contains filtered or unexported fields
}

HistoryKvDB provider an implementation of `historydb.HistoryDB` This implementation provides a key-value based data model

func NewHistoryKvDB

func NewHistoryKvDB(chainId string, config *conf.HistoryDbConfig, db protocol.DBHandle,
	logger protocol.Logger) *HistoryKvDB

func (*HistoryKvDB) Close

func (h *HistoryKvDB) Close()

Close is used to close database

func (*HistoryKvDB) CommitBlock

func (h *HistoryKvDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error

CommitBlock commits the block rwsets in an atomic operation

func (*HistoryKvDB) GetAccountTxHistory

func (h *HistoryKvDB) GetAccountTxHistory(account []byte) (historydb.HistoryIterator, error)

GetAccountTxHistory AccountId+BlockHeight+ TxId

func (*HistoryKvDB) GetContractTxHistory

func (h *HistoryKvDB) GetContractTxHistory(contractName string) (historydb.HistoryIterator, error)

func (*HistoryKvDB) GetHistoryForKey

func (h *HistoryKvDB) GetHistoryForKey(contractName string, key []byte) (historydb.HistoryIterator, error)

func (*HistoryKvDB) GetLastSavepoint

func (h *HistoryKvDB) GetLastSavepoint() (uint64, error)

GetLastSavepoint returns the last block height

func (*HistoryKvDB) InitGenesis

func (h *HistoryKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error

Jump to

Keyboard shortcuts

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