<p>If the execution of OP_EQUAL gives true, then it does not leave true/false on the stack. If it is false then it leaves false on top of the stack and stops executing. </p>

<pre><code>Bstack.push_back(fEqual ? vchTrue : vchFalse);
if (opcode == OP_EQUALVERIFY)
{
if (fEqual)
    popstack(stack);
else
    return set_error(serror, SCRIPT_ERR_EQUALVERIFY);
}
</code></pre>

<p><a href="https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L634-641" rel="nofollow">Source</a></p>

CC BY-SA 3.0
2015-04-04T19:30:00.290Z
Is the Bitcoin wiki wrong on this one, then?
Nick ODell
CC BY-SA 3.0
2015-04-04T19:35:26.967Z
I would say so. I think it should be Nothing / False, just like OP_VERIFY.
morsecoder
CC BY-SA 3.0
2015-04-04T19:29:16.257Z
2015-04-04T19:31:02.107Z
2015-04-04T19:31:02.107Z
morsecoder
<p>The Bitcoin wiki has a page that summarizes <a href="https://en.bitcoin.it/wiki/Script#Bitwise_logic" rel="nofollow noreferrer">OP_EQUAL and OP_EQUALVERIFY</a>:</p>
<blockquote>
<p>OP_EQUAL</p>
<ul>
<li>Opcode (Hex): 135 (0x87)</li>
<li>Input: x1 x2</li>
<li>Output: True / false</li>
<li>Summary: Returns 1 if the inputs are exactly equal, 0 otherwise.</li>
</ul>
<p>OP_EQUALVERIFY</p>
<ul>
<li>Opcode (Hex): 136 (0x88)</li>
<li>Input: x1 x2</li>
<li>Output: True / false</li>
<li>Summary: Same as OP_EQUAL, but runs OP_VERIFY afterward.</li>
</ul>
</blockquote>
<p><code>OP_EQUALVERIFY</code> is listed as having a return code, when it doesn't seem like it should. (<code>OP_EQUAL OP_VERIFY</code> wouldn't leave anything on the stack.)</p>

<script>
Does OP_EQUALVERIFY have a return value?
Nick ODell
# Does OP_EQUALVERIFY have a return value?

(Asked by: username_0 on 2015-04-04)

The Bitcoin wiki has a page that summarizes [OP\_EQUAL and OP\_EQUALVERIFY](https://en.bitcoin.it/wiki/Script#Bitwise_logic):

> OP\_EQUAL
>
> * Opcode (Hex): 135 (0x87)
> * Input: x1 x2
> * Output: True / false
> * Summary: Returns 1 if the inputs are exactly equal, 0 otherwise.
>
> OP\_EQUALVERIFY
>
> * Opcode (Hex): 136 (0x88)
> * Input: x1 x2
> * Output: True / false
> * Summary: Same as OP\_EQUAL, but runs OP\_VERIFY afterward.

`OP_EQUALVERIFY` is listed as having a return code, when it doesn't seem like it should. (`OP_EQUAL OP_VERIFY` wouldn't leave anything on the stack.)

**Tags:** script


---

## 1 answers

### Answer by username_1 on 2015-04-04. Score: 1 | Accepted answer

If the execution of OP\_EQUAL gives true, then it does not leave true/false on the stack. If it is false then it leaves false on top of the stack and stops executing.

```
Bstack.push_back(fEqual ? vchTrue : vchFalse);
if (opcode == OP_EQUALVERIFY)
{
if (fEqual)
    popstack(stack);
else
    return set_error(serror, SCRIPT_ERR_EQUALVERIFY);
}

```

[Source](https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L634-641)

> **Comments:**
> **username_0**: Is the Bitcoin wiki wrong on this one, then?  
> **username_1**: I would say so. I think it should be Nothing / False, just like OP_VERIFY.  

---

