historykvdb

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package historykvdb package

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` @Description: 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

NewHistoryKvDB init historyKvDB handler @Description: @param chainId @param config @param db @param logger @return *HistoryKvDB

func (*HistoryKvDB) Close

func (h *HistoryKvDB) Close()

Close is used to close database @Description: @receiver h

func (*HistoryKvDB) CommitBlock

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

CommitBlock commits the block rwsets in an atomic operation @Description: @receiver h @param blockInfo @param isCache @return error

func (*HistoryKvDB) GetAccountTxHistory

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

GetAccountTxHistory AccountId+BlockHeight+ TxId @Description: @receiver h @param account @return historydb.HistoryIterator @return error

func (*HistoryKvDB) GetContractTxHistory

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

GetContractTxHistory construct an iterator , according to contractName @Description: @receiver h @param contractName @return historydb.HistoryIterator @return error

func (*HistoryKvDB) GetHistoryForKey

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

GetHistoryForKey construct an iterator,according to contractName and key @Description: @receiver h @param contractName @param key @return historydb.HistoryIterator @return error

func (*HistoryKvDB) GetLastSavepoint

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

GetLastSavepoint returns the last block height @Description: @receiver h @return uint64 @return error

func (*HistoryKvDB) InitGenesis

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

InitGenesis init genesis block @Description: @receiver h @param genesisBlock @return error

Jump to

Keyboard shortcuts

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