resultfiledb

package
v2.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package resultfiledb package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultFileDB

type ResultFileDB struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ResultFileDB provider an implementation of `historydb.HistoryDB` @Description: This implementation provides a key-value based data model

func NewResultFileDB

func NewResultFileDB(chainId string, handle protocol.DBHandle, logger protocol.Logger,
	storeConfig *conf.StorageConfig, fileDB binlog.BinLogger) *ResultFileDB

NewResultFileDB construct ResultFileDB @Description: @param chainId @param handle @param logger @param storeConfig @param fileDB @return *ResultFileDB

func (*ResultFileDB) Close

func (h *ResultFileDB) Close()

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

func (*ResultFileDB) CommitBlock

func (h *ResultFileDB) 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 (*ResultFileDB) GetLastSavepoint

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

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

func (*ResultFileDB) GetRWSetIndex

func (h *ResultFileDB) GetRWSetIndex(txId string) (*storePb.StoreInfo, error)

GetRWSetIndex returns the offset of the block in the file @Description: @receiver h @param txId @return *storePb.StoreInfo @return error

func (*ResultFileDB) GetTxRWSet

func (h *ResultFileDB) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)

GetTxRWSet returns an txRWSet for given txId, or returns nil if none exists. @Description: @receiver h @param txId @return *commonPb.TxRWSet @return error

func (*ResultFileDB) InitGenesis

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

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

func (*ResultFileDB) RestoreBlocks

func (h *ResultFileDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error

RestoreBlocks not implement @Description: @receiver h @param blockInfos @return error

func (*ResultFileDB) ShrinkBlocks

func (h *ResultFileDB) ShrinkBlocks(_ map[uint64][]string, height uint64, bfdbPath string) error

ShrinkBlocks archive old blocks rwSets in an atomic operation @Description: @receiver h @param txIdsMap @param height @param bfdbPath @return error

Jump to

Keyboard shortcuts

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