mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-05-31 13:18:50 +00:00
CH07: Remove claim about VERIFY opcodes that doesn't apply to CLTV/CSV
Previous text claimed VERIFY opcodes consumed their inputs, but that's not the case for upgraded OP_NOP opcodes.
This commit is contained in:
parent
5ea4e4ef03
commit
50795e578f
@ -1111,16 +1111,6 @@ The script with +OP_IF+ does the same thing as using an opcode with a
|
|||||||
So, when do we use +VERIFY+ and when do we use +OP_IF+? If all we are
|
So, when do we use +VERIFY+ and when do we use +OP_IF+? If all we are
|
||||||
trying to do is to attach a precondition (guard clause), then +VERIFY+
|
trying to do is to attach a precondition (guard clause), then +VERIFY+
|
||||||
is better. If, however, we want to have more than one execution path
|
is better. If, however, we want to have more than one execution path
|
||||||
|
|
||||||
[TIP]
|
|
||||||
====
|
|
||||||
((("EQUAL opcode")))((("opcodes", "EQUAL")))((("EQUALVERIFY
|
|
||||||
opcode")))((("opcodes", "EQUALVERIFY")))An opcode such as +EQUAL+ will
|
|
||||||
push the result (+TRUE+/+FALSE+) onto the stack, leaving it there for
|
|
||||||
evaluation by subsequent opcodes. In contrast, the opcode +EQUALVERIFY+
|
|
||||||
suffix does not leave anything on the stack. Opcodes that end in
|
|
||||||
+VERIFY+ do not leave the result on the stack.
|
|
||||||
====
|
|
||||||
(flow control), then we need an +OP_IF...OP_ELSE+ flow control clause.
|
(flow control), then we need an +OP_IF...OP_ELSE+ flow control clause.
|
||||||
|
|
||||||
==== Using Flow Control in Scripts
|
==== Using Flow Control in Scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user