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:
Evgeniy Stratonikov 2021-01-12 12:30:21 +03:00 committed by Roman Khimov
parent d04b000748
commit 2130e17f0c
16 changed files with 86 additions and 422 deletions

View file

@ -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
}