Talk:OP CHECKSIG

From Bitcoin Wiki
Revision as of 14:57, 30 July 2011 by Sirk390 (talk | contribs)
Jump to navigation Jump to search

Redundant step?

Under "How it works", we have steps 2 and 6:

- 2. A new subscript is created from the instruction from the most recent OP_CODESEPARATOR to the end of the script. If there is no OP_CODESEPARATOR the entire script becomes the subscript (hereby referred to as subScript)

- 6. All OP_CODESEPARATORS are removed from subScript

However, doesn't step 6 seem redundant? Vegard

Answer: sirk390

   See comment for step 6. in the bitcoin sources (script.cpp:882)
      // In case concatenating two scripts ends up with two codeseparators,
      // or an extra one at the end, this prevents all those possible incompatibilities.
   In step 2, only OP_CODESEPARATOR before OP_CHECKSIG are removed. In step OP_CODESEPARATOR after OP_CHECKSIG are also removed.