Permalink
Browse files

Test canonical prunable txout format explicitly

  • Loading branch information...
1 parent 6131d1d commit 091f18419011bfee6242270e52237f524ca23c8e @petertodd petertodd committed Mar 1, 2013
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/test/data/script_invalid.json
  2. +2 −0 src/test/data/script_valid.json
View
3 src/test/data/script_invalid.json
@@ -39,6 +39,9 @@
["1", "RETURN"],
["1", "DUP IF RETURN ENDIF"],
+["1", "RETURN 'data'", "canonical prunable txout format"],
+["0 IF", "RETURN ENDIF 1", "still prunable because IF/ENDIF can't span scriptSig/scriptPubKey"],
+
["0", "VERIFY 1"],
["1", "VERIFY"],
["1", "VERIFY 0"],
View
2 src/test/data/script_valid.json
@@ -34,6 +34,8 @@
["1 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
["0 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
+["0", "IF RETURN ENDIF 1", "RETURN only works if executed"],
+
["1 1", "VERIFY"],
["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL"],

0 comments on commit 091f184

Please sign in to comment.