Пример #1
0
// Load enables a peer to read the value that corresponds to the given database key
func (p *PeerImpl) Load(key string) ([]byte, error) {
	db := db.GetDBHandle()
	return db.Get(db.PersistCF, []byte(key))
}
Пример #2
0
func (h *PersistHelper) ReadState(key string) ([]byte, error) {
	db := db.GetDBHandle()
	return db.Get(db.PersistCF, []byte("consensus."+key))
}