Documentation ¶
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(txIdsMap map[uint64][]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultFileDB ¶
ResultFileDB provider a implementation of `historydb.HistoryDB` 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
func (*ResultFileDB) CommitBlock ¶
func (h *ResultFileDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
CommitBlock commits the block rwsets in an atomic operation
func (*ResultFileDB) GetLastSavepoint ¶
func (h *ResultFileDB) GetLastSavepoint() (uint64, error)
GetLastSavepoint returns the last block height
func (*ResultFileDB) GetRWSetIndex ¶
func (h *ResultFileDB) GetRWSetIndex(txId string) (*storePb.StoreInfo, error)
GetRWSetIndex returns the offset of the block in the file
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.
func (*ResultFileDB) InitGenesis ¶
func (h *ResultFileDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
func (*ResultFileDB) RestoreBlocks ¶
func (h *ResultFileDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
func (*ResultFileDB) ShrinkBlocks ¶
func (h *ResultFileDB) ShrinkBlocks(txIdsMap map[uint64][]string) error
ShrinkBlocks archive old blocks rwsets in an atomic operation
Click to show internal directories.
Click to hide internal directories.