mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
core: add flags to Storage.Find
It can be iterated over keys, values or both. Prefix can be stripped.
This commit is contained in:
parent
2130e17f0c
commit
7fc0c04dba
8 changed files with 148 additions and 24 deletions
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// NotifyKeysAndValues sends notification with `foo` storage keys and values
|
||||
func NotifyKeysAndValues() bool {
|
||||
iter := storage.Find(storage.GetContext(), []byte("foo"))
|
||||
iter := storage.Find(storage.GetContext(), []byte("foo"), storage.None)
|
||||
for iterator.Next(iter) {
|
||||
runtime.Notify("found storage key-value pair", iterator.Value(iter))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue