Bitcoin Forum
June 23, 2024, 12:33:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: Help with understanding Bitcoin script. on: August 30, 2020, 10:19:08 AM
Awesome! Thank you for your help with clarifying Smiley
2  Bitcoin / Bitcoin Technical Support / Help with understanding Bitcoin script. on: August 30, 2020, 08:01:01 AM
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:

Code:
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:

Code:
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.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!