Esempio n. 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))
}
Esempio n. 2
0
func (h *PersistHelper) ReadState(key string) ([]byte, error) {
	db := db.GetDBHandle()
	return db.Get(db.PersistCF, []byte("consensus."+key))
}