core,vm: remove System.Enumerator.*
interops
Map iterator now returns key-value pair, while array/byte-array iterators work like old enumerators. Follow neo-project/neo#2190.
This commit is contained in:
parent
d04b000748
commit
2130e17f0c
16 changed files with 86 additions and 422 deletions
|
@ -9,13 +9,8 @@ import (
|
|||
// NotifyKeysAndValues sends notification with `foo` storage keys and values
|
||||
func NotifyKeysAndValues() bool {
|
||||
iter := storage.Find(storage.GetContext(), []byte("foo"))
|
||||
values := iterator.Values(iter)
|
||||
keys := iterator.Keys(iter)
|
||||
|
||||
runtime.Notify("found storage values", values)
|
||||
// For illustration purposes event is emitted with 'Any' type.
|
||||
var typedKeys interface{} = keys
|
||||
runtime.Notify("found storage keys", typedKeys)
|
||||
|
||||
for iterator.Next(iter) {
|
||||
runtime.Notify("found storage key-value pair", iterator.Value(iter))
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue