MCPcopy Create free account
hub / github.com/btcsuite/btcd / opcodeNumEqualVerify

Function opcodeNumEqualVerify

txscript/opcode.go:1656–1662  ·  view source on GitHub ↗

opcodeNumEqualVerify is a combination of opcodeNumEqual and opcodeVerify. Specifically, treats the top two items on the data stack as integers. When they are equal, they are replaced with a 1, otherwise a 0. Then, it examines the top item on the data stack as a boolean value and verifies it evalu

(op *opcode, data []byte, vm *Engine)

Source from the content-addressed store, hash-verified

1654//
1655// Stack transformation: [... x1 x2] -> [... bool] -> [...]
1656func opcodeNumEqualVerify(op *opcode, data []byte, vm *Engine) error {
1657 err := opcodeNumEqual(op, data, vm)
1658 if err == nil {
1659 err = abstractVerify(op, vm, ErrNumEqualVerify)
1660 }
1661 return err
1662}
1663
1664// opcodeNumNotEqual treats the top two items on the data stack as integers.
1665// When they are NOT equal, they are replaced with a 1, otherwise a 0.

Callers

nothing calls this directly

Calls 2

opcodeNumEqualFunction · 0.85
abstractVerifyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…