Documentation ¶
Index ¶
- Variables
- func ConstructCompositeHistoryKey(ns string, key string, blocknum uint64, trannum uint64) []byte
- func ConstructPartialCompositeHistoryKey(ns string, key string, endkey bool) []byte
- func SplitCompositeHistoryKey(bytesToSplit []byte, separator []byte) ([]byte, []byte)
- type HistoryDB
- type HistoryDBProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var CompositeKeySep = []byte{0x00}
CompositeKeySep is a nil byte used as a separator between different components of a composite key
Functions ¶
func ConstructCompositeHistoryKey ¶
ConstructCompositeHistoryKey builds the History Key of namespace~key~blocknum~trannum using an order preserving encoding so that history query results are ordered by height
func ConstructPartialCompositeHistoryKey ¶
ConstructPartialCompositeHistoryKey builds a partial History Key namespace~key~ for use in history key range queries
Types ¶
type HistoryDB ¶
type HistoryDB interface { NewHistoryQueryExecutor(blockStore blkstorage.BlockStore) (ledger.HistoryQueryExecutor, error) Commit(block *common.Block) error GetLastSavepoint() (*version.Height, error) ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error) CommitLostBlock(blockAndPvtdata *ledger.BlockAndPvtData) error }
HistoryDB - an interface that a history database should implement
type HistoryDBProvider ¶
type HistoryDBProvider interface { // GetDBHandle returns a handle to a HistoryDB GetDBHandle(id string) (HistoryDB, error) // Close closes all the HistoryDB instances and releases any resources held by HistoryDBProvider Close() }
HistoryDBProvider provides an instance of a history DB
Click to show internal directories.
Click to hide internal directories.