Documentation ¶
Overview ¶
Package resultfiledb package
Index ¶
- type ResultFileDB
- func (h *ResultFileDB) Close()
- func (h *ResultFileDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
- func (h *ResultFileDB) GetLastSavepoint() (uint64, error)
- func (h *ResultFileDB) GetRWSetIndex(txId string) (*storePb.StoreInfo, error)
- func (h *ResultFileDB) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)
- func (h *ResultFileDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
- func (h *ResultFileDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
- func (h *ResultFileDB) ShrinkBlocks(_ map[uint64][]string, height uint64, bfdbPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultFileDB ¶
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