forked from TrueCloudLab/frostfs-node
Initial commit
Initial public review release v0.10.0
This commit is contained in:
commit
dadfd90dcd
276 changed files with 46331 additions and 0 deletions
20
lib/localstore/has.go
Normal file
20
lib/localstore/has.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package localstore
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/refs"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func (l *localstore) Has(key refs.Address) (bool, error) {
|
||||
var (
|
||||
err error
|
||||
k []byte
|
||||
)
|
||||
|
||||
k, err = key.Hash()
|
||||
if err != nil {
|
||||
return false, errors.Wrap(err, "localstore.Has failed on key.Marshal")
|
||||
}
|
||||
|
||||
return l.metaBucket.Has(k) && l.blobBucket.Has(k), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue