Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 428 Bytes

db_go.md

File metadata and controls

17 lines (14 loc) · 428 Bytes

db.go

基于 rocksdb 的接口进行封装,主要有 OpenchainDB 这个数据结构。

type OpenchainDB struct {
	DB           *gorocksdb.DB
	BlockchainCF *gorocksdb.ColumnFamilyHandle
	StateCF      *gorocksdb.ColumnFamilyHandle
	StateDeltaCF *gorocksdb.ColumnFamilyHandle
	IndexesCF    *gorocksdb.ColumnFamilyHandle
	PersistCF    *gorocksdb.ColumnFamilyHandle
	dbState      dbState
	mux          sync.Mutex
}