forked from TrueCloudLab/frostfs-contract
[#199] test: Use storage.RemovePrefix
flag
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
17907f9457
commit
d78edb66db
1 changed files with 2 additions and 4 deletions
|
@ -578,12 +578,10 @@ func calledByOwnerOrAdmin(ctx storage.Context, owner []byte, adminPrefix []byte)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
prefixLen := len(adminPrefix)
|
iter := storage.Find(ctx, adminPrefix, storage.KeysOnly|storage.RemovePrefix)
|
||||||
|
|
||||||
iter := storage.Find(ctx, adminPrefix, storage.KeysOnly)
|
|
||||||
for iterator.Next(iter) {
|
for iterator.Next(iter) {
|
||||||
key := iterator.Value(iter).([]byte)
|
key := iterator.Value(iter).([]byte)
|
||||||
if runtime.CheckWitness(key[prefixLen:]) {
|
if runtime.CheckWitness(key) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue