2019-03-16 22:06:32 +00:00
|
|
|
package vm
|
|
|
|
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/vm/stack"
|
|
|
|
|
|
|
|
// Bitwise logic
|
|
|
|
|
|
|
|
// EQUAL pushes true to the stack
|
|
|
|
// If the two top items on the stack are equal
|
2019-03-18 21:14:03 +00:00
|
|
|
func EQUAL(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation, rstack *stack.RandomAccess) (Vmstate, error) {
|
2019-03-16 22:06:32 +00:00
|
|
|
|
|
|
|
itemA, itemB, err := popTwoByteArrays(ctx)
|
|
|
|
if err != nil {
|
|
|
|
return FAULT, err
|
|
|
|
}
|
|
|
|
ctx.Estack.Push(itemA.Equals(itemB))
|
|
|
|
return NONE, nil
|
|
|
|
}
|