Author

Topic: Quick stupid question on OP_NOTIF (Read 711 times)

hero member
Activity: 793
Merit: 1016
August 19, 2016, 04:53:49 AM
#3
Thanks.  It would be cleaner to use OP_IF, but it saves redeemscript space to use NOTIF, and for Bitcoin I figure saving space is the way to go.
staff
Activity: 3374
Merit: 6530
Just writing some code
August 17, 2016, 08:51:23 AM
#2
That is correct, you can begin the block with OP_NOTIF.
hero member
Activity: 793
Merit: 1016
August 17, 2016, 06:03:42 AM
#1
Can OP_NOTIF begin an if/else block?  That is, is the following code valid:

Code:

OP_NOTIF
   
OP_ENDIF

Or does an if/else block need to always begin with an OP_IF?

I assume I am correct that you can begin with OP_NOTIF, and that the above script code is valid, but I wanted to double check.
Jump to: