Skip to content

Commit ca0b8ac

Browse files
committed
Merge pull request #3841 from schildbach/script-tests-OP_0
Add script test to prove that OP_0 evaluates as the empty vector.
2 parents 1725e6a + ffd082a commit ca0b8ac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/test/data/script_invalid.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,5 +325,7 @@
325325
["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
326326

327327
["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "OP_RESERVED in P2SH should fail"],
328-
["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "OP_VER in P2SH should fail"]
328+
["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "OP_VER in P2SH should fail"],
329+
330+
["0x00", "'00' EQUAL", "Basic OP_0 execution"]
329331
]

src/test/data/script_valid.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,5 +411,7 @@
411411

412412
["0x4c 0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
413413
"0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
414-
"Basic PUSHDATA1 signedness check"]
414+
"Basic PUSHDATA1 signedness check"],
415+
416+
["0x00", "SIZE 0 EQUAL", "Basic OP_0 execution"]
415417
]

0 commit comments

Comments
 (0)