interop: remove System.Iterator.Create, fix #1935

There are now only storage iterators. Related #1933.
This commit is contained in:
Evgeniy Stratonikov 2021-04-29 17:19:30 +03:00
parent 721748acfd
commit 23a4e25436
12 changed files with 83 additions and 246 deletions

View file

@ -11,14 +11,6 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal"
// structure is similar in function to Neo .net framework's Iterator.
type Iterator struct{}
// Create creates an iterator from the given items (array, struct, map, byte
// array or integer and boolean converted to byte array). A new iterator is set
// to point at element -1, so to access its first element you need to call Next
// first. This function uses `System.Iterator.Create` syscall.
func Create(items interface{}) Iterator {
return neogointernal.Syscall1("System.Iterator.Create", items).(Iterator)
}
// Next advances the iterator returning true if it is was successful (and you
// can use Key or Value) and false otherwise (and there are no more elements in
// this Iterator). This function uses `System.Iterator.Next` syscall.