Documentation ¶
Index ¶
- type ResultKvDB
- func (h *ResultKvDB) Close()
- func (h *ResultKvDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
- func (h *ResultKvDB) GetLastSavepoint() (uint64, error)
- func (h *ResultKvDB) GetRWSetIndex(txId string) (*storePb.StoreInfo, error)
- func (h *ResultKvDB) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)
- func (h *ResultKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
- func (h *ResultKvDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
- func (h *ResultKvDB) ShrinkBlocks(txIdsMap map[uint64][]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultKvDB ¶
ResultKvDB provider a implementation of `historydb.HistoryDB` This implementation provides a key-value based data model
func NewResultKvDB ¶
func NewResultKvDB(chainId string, handle protocol.DBHandle, logger protocol.Logger, storeConfig *conf.StorageConfig) *ResultKvDB
func (*ResultKvDB) CommitBlock ¶
func (h *ResultKvDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
CommitBlock commits the block rwsets in an atomic operation
func (*ResultKvDB) GetLastSavepoint ¶
func (h *ResultKvDB) GetLastSavepoint() (uint64, error)
GetLastSavepoint returns the last block height
func (*ResultKvDB) GetRWSetIndex ¶
func (h *ResultKvDB) GetRWSetIndex(txId string) (*storePb.StoreInfo, error)
GetRWSetIndex returns the offset of the block in the file
func (*ResultKvDB) GetTxRWSet ¶
func (h *ResultKvDB) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)
GetTxRWSet returns an txRWSet for given txId, or returns nil if none exists.
func (*ResultKvDB) InitGenesis ¶
func (h *ResultKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
func (*ResultKvDB) RestoreBlocks ¶
func (h *ResultKvDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
func (*ResultKvDB) ShrinkBlocks ¶
func (h *ResultKvDB) 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.