[#199] test: Use storage.RemovePrefix flag

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-12-10 14:17:23 +03:00 committed by Alex Vanin
parent 17907f9457
commit d78edb66db

View file

@ -578,12 +578,10 @@ func calledByOwnerOrAdmin(ctx storage.Context, owner []byte, adminPrefix []byte)
return true
}
prefixLen := len(adminPrefix)
iter := storage.Find(ctx, adminPrefix, storage.KeysOnly)
iter := storage.Find(ctx, adminPrefix, storage.KeysOnly|storage.RemovePrefix)
for iterator.Next(iter) {
key := iterator.Value(iter).([]byte)
if runtime.CheckWitness(key[prefixLen:]) {
if runtime.CheckWitness(key) {
return true
}
}