From 091f18419011bfee6242270e52237f524ca23c8e Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Fri, 1 Mar 2013 02:39:22 -0500 Subject: [PATCH] Test canonical prunable txout format explicitly --- src/test/data/script_invalid.json | 3 +++ src/test/data/script_valid.json | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json index b49b3293..95664226 100644 --- a/src/test/data/script_invalid.json +++ b/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"], diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json index 7624c5f4..58682d38 100644 --- a/src/test/data/script_valid.json +++ b/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"],