I'm going through the book Mastering Bitcoin, and I have a query regarding the section on "Using Flow Control in Scripts".
So, there is an example of a redeem script as follows:
IF
<Alice's PK> CHECKSIG
ELSE
<Bob's PK> CHECKSIG
ENDIF
I'm wondering why it is structured in this manner, instead of the following:
IF
<Alice's PK>
ELSE
<Bob's PK>
ENDIF
CHECKSIG
Would the latter work? And if so, would it be the better version as it saves space by one opcode?
Thank you all in advance.