opcodeEqual removes the top 2 items of the data stack, compares them as raw bytes, and pushes the result, encoded as a boolean, back to the stack. Stack transformation: [... x1 x2] -> [... bool]
(op *opcode, data []byte, vm *Engine)
| 1395 | // |
| 1396 | // Stack transformation: [... x1 x2] -> [... bool] |
| 1397 | func opcodeEqual(op *opcode, data []byte, vm *Engine) error { |
| 1398 | a, err := vm.dstack.PopByteArray() |
| 1399 | if err != nil { |
| 1400 | return err |
| 1401 | } |
| 1402 | b, err := vm.dstack.PopByteArray() |
| 1403 | if err != nil { |
| 1404 | return err |
| 1405 | } |
| 1406 | |
| 1407 | vm.dstack.PushBool(bytes.Equal(a, b)) |
| 1408 | return nil |
| 1409 | } |
| 1410 | |
| 1411 | // opcodeEqualVerify is a combination of opcodeEqual and opcodeVerify. |
| 1412 | // Specifically, it removes the top 2 items of the data stack, compares them, |
no test coverage detected
searching dependent graphs…