[#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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue