txscript: Add new flag ScriptVerifyCleanStack

The ScriptVerifyCleanStack flag requires that only a single
stack element remains after evaluation and that when interpreted
as a bool, it must be true.  This is BIP0062, rule 6.

This mimics Bitcoin Core commit b6e03cc59208305681745ad06f2056ffe6690597
This commit is contained in:
David Hill
2015-02-25 15:04:37 -05:00
parent d3aebcaed3
commit 9523345814
5 changed files with 114 additions and 14 deletions

View File

@@ -897,6 +897,12 @@
"P2SH",
"P2SH with unnecessary input but no CLEANSTACK"
],
[
"0x47 0x304402202f7505132be14872581f35d74b759212d9da40482653f1ffa3116c3294a4a51702206adbf347a2240ca41c66522b1a22a41693610b76a8e7770645dc721d1635854f01 0x43 0x410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
"HASH160 0x14 0x31edc23bdafda4639e669f89ad6b2318dd79d032 EQUAL",
"CLEANSTACK,P2SH",
"P2SH with CLEANSTACK"
],
["The End"]
]