moneybutton / bsv

Bitcoin SV javascript library
Other
205 stars 107 forks source link

bug fix: stack evaluation returns wrong result #222

Open xhliu opened 3 years ago

xhliu commented 3 years ago

To reproduce the bug, use:

Unlocking script: OP_1 Locking script: OP_1 OP_RETURN

Enable Interp.SCRIPT_VERIFY_P2SH | Interp.SCRIPT_VERIFY_CLEANSTACK.

Seen: Currently script evaluation returns true, since stackCopy is stack with one element 1.

Expected: When OP_RETURN finishes, there are two elements on stack, both 1's. Should return false instead.