mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 13:58:05 +00:00
bcc11cbd74
Go-way of removing elements from slice is via `append` builtin. There is a separate opcode for removing elements from Arrays, which is cheaper and supported in this commit.
24 lines
799 B
Go
24 lines
799 B
Go
/*
|
|
Package util contains some special useful functions that are provided by compiler and VM.
|
|
*/
|
|
package util
|
|
|
|
// FromAddress is an utility function that converts a Neo address to its hash
|
|
// (160 bit BE value in a 20 byte slice). It can only be used for strings known
|
|
// at compilation time, because the conversion is actually being done by the
|
|
// compiler.
|
|
func FromAddress(address string) []byte {
|
|
return nil
|
|
}
|
|
|
|
// Equals compares a with b and will return true when a and b are equal. It's
|
|
// implemented as an EQUAL VM opcode, so the rules of comparison are those
|
|
// of EQUAL.
|
|
func Equals(a, b interface{}) bool {
|
|
return false
|
|
}
|
|
|
|
// Remove removes element with index i from slice.
|
|
// This is done in place and slice must have type other than `[]byte`.
|
|
func Remove(slice interface{}, i int) {
|
|
}
|