mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-26 01:50:42 +00:00
Edited ch07.asciidoc with Atlas code editor
This commit is contained in:
parent
3686517aa7
commit
22f6661ecb
@ -427,9 +427,9 @@ When reading Bitcoin Script, remember that the condition being evaluated comes _
|
||||
|
||||
==== Conditional Clauses with VERIFY Opcodes
|
||||
|
||||
Another form of conditional in Bitcoin Script is any opcode that ends in +VERIFY+. The +VERIFY+ suffix means that if the condition evaluated is not +TRUE+, execution of the script terminates immediately and the transaction is deemed invalid.
|
||||
((("VERIFY opcodes")))((("IF clauses")))Another form of conditional in Bitcoin Script is any opcode that ends in +VERIFY+. The +VERIFY+ suffix means that if the condition evaluated is not +TRUE+, execution of the script terminates immediately and the transaction is deemed invalid.
|
||||
|
||||
Unlike an +IF+ clause, which offers alternative execution paths, the +VERIFY+ suffix acts as a _guard clause_, continuing only if a precondition is met.
|
||||
((("guard clauses")))Unlike an +IF+ clause, which offers alternative execution paths, the +VERIFY+ suffix acts as a _guard clause_, continuing only if a precondition is met.
|
||||
|
||||
For example, the following script requires Bob's signature and a pre-image (secret) that produces a specific hash. Both conditions must be satisfied to unlock:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user