mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
examples: extend storage contract
Add method that returns iterator. It's needed for the workshop. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
b5f17215db
commit
4e6b1c4a38
1 changed files with 6 additions and 0 deletions
|
@ -54,3 +54,9 @@ func Find(value []byte) []string {
|
|||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// FindReturnIter returns an iterator over key-value pairs with the key that has the specified prefix.
|
||||
func FindReturnIter(prefix []byte) iterator.Iterator {
|
||||
iter := storage.Find(ctx, prefix, storage.None)
|
||||
return iter
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue