opcodeexplained.com icon indicating copy to clipboard operation
opcodeexplained.com copied to clipboard

opcodes like OP_VERIFY can also cause script to fail

Open jdlcdl opened this issue 10 months ago • 0 comments

referencing https://github.com/thunderbiscuit/opcodeexplained.com/blob/ecc35350a57a049c5e45d2c12b5f597dda54104d/script/script.md?plain=1#L17

Suggesting :

 - If the opcode functions to validate a condition and quickly terminate when that condition is not valid (ie: OP_VERIFY).
 - if OP_ENDIF is reached without a previous opening OP_IF, OP_NOTIF, or OP_ELSE.

and then as the last two in this list:

 - if at the end of the script, a conditional segment was not closed by OP_ENDIF.
 - If after the script concludes, the top of the stack is "false" (empty or zero -- regardless of additional items below).

jdlcdl avatar Feb 09 '25 15:02 jdlcdl