MCPcopy Create free account
hub / github.com/CPChain/chain / Get

Method Get

database/leveldb.go:70–76  ·  view source on GitHub ↗

Get returns the given key if it's present.

(key []byte)

Source from the content-addressed store, hash-verified

68
69// Get returns the given key if it's present.
70func (db *LDBDatabase) Get(key []byte) ([]byte, error) {
71 dat, err := db.db.Get(key, nil)
72 if err != nil {
73 return nil, err
74 }
75 return dat, nil
76}
77
78// Delete deletes the key from the queue and database
79func (db *LDBDatabase) Delete(key []byte) error {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected