bitcoind only fails on invalid (undefined) opcodes when they are executed.

So add entries for them that disassemble and parse ok, but will fail
when executed with the appropriate error. Add a full suite of tests to confirm
that this happens.

Found by a strange transaction in testnet.
This commit is contained in:
Owain G. Ainsworth 2013-10-07 23:36:39 +01:00
parent a5f81fc545
commit 52a1488eaf
4 changed files with 756 additions and 138 deletions

View file

@ -129,6 +129,19 @@ func TestParseOpcode(t *testing.T) {
if err == nil {
t.Errorf("no error with dodgy opcode map!")
}
// Missing entry.
fakemap = make(map[byte]*opcode)
for k, v := range opcodemap {
fakemap[k] = v
}
delete(fakemap, OP_PUSHDATA4)
// this script would be fine if -8 was a valid length.
_, err = parseScriptTemplate([]byte{OP_PUSHDATA4, 0x1, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}, fakemap)
if err == nil {
t.Errorf("no error with dodgy opcode map (missing entry)!")
}
}
type popTest struct {

201
opcode.go
View file

@ -223,6 +223,73 @@ const (
OP_NOP8 = 183
OP_NOP9 = 184
OP_NOP10 = 185
OP_UNKNOWN186 = 186
OP_UNKNOWN187 = 187
OP_UNKNOWN188 = 188
OP_UNKNOWN189 = 189
OP_UNKNOWN190 = 190
OP_UNKNOWN191 = 191
OP_UNKNOWN192 = 192
OP_UNKNOWN193 = 193
OP_UNKNOWN194 = 194
OP_UNKNOWN195 = 195
OP_UNKNOWN196 = 196
OP_UNKNOWN197 = 197
OP_UNKNOWN198 = 198
OP_UNKNOWN199 = 199
OP_UNKNOWN200 = 200
OP_UNKNOWN201 = 201
OP_UNKNOWN202 = 202
OP_UNKNOWN203 = 203
OP_UNKNOWN204 = 204
OP_UNKNOWN205 = 205
OP_UNKNOWN206 = 206
OP_UNKNOWN207 = 207
OP_UNKNOWN208 = 208
OP_UNKNOWN209 = 209
OP_UNKNOWN210 = 210
OP_UNKNOWN211 = 211
OP_UNKNOWN212 = 212
OP_UNKNOWN213 = 213
OP_UNKNOWN214 = 214
OP_UNKNOWN215 = 215
OP_UNKNOWN216 = 216
OP_UNKNOWN217 = 217
OP_UNKNOWN218 = 218
OP_UNKNOWN219 = 219
OP_UNKNOWN220 = 220
OP_UNKNOWN221 = 221
OP_UNKNOWN222 = 222
OP_UNKNOWN223 = 223
OP_UNKNOWN224 = 224
OP_UNKNOWN225 = 225
OP_UNKNOWN226 = 226
OP_UNKNOWN227 = 227
OP_UNKNOWN228 = 228
OP_UNKNOWN229 = 229
OP_UNKNOWN230 = 230
OP_UNKNOWN231 = 231
OP_UNKNOWN232 = 232
OP_UNKNOWN233 = 233
OP_UNKNOWN234 = 234
OP_UNKNOWN235 = 235
OP_UNKNOWN236 = 236
OP_UNKNOWN237 = 237
OP_UNKNOWN238 = 238
OP_UNKNOWN239 = 239
OP_UNKNOWN240 = 240
OP_UNKNOWN241 = 241
OP_UNKNOWN242 = 242
OP_UNKNOWN243 = 243
OP_UNKNOWN244 = 244
OP_UNKNOWN245 = 245
OP_UNKNOWN246 = 246
OP_UNKNOWN247 = 247
OP_UNKNOWN248 = 248
OP_UNKNOWN249 = 249
OP_UNKNOWN250 = 250
OP_UNKNOWN251 = 251
OP_UNKNOWN252 = 252
OP_PUBKEYHASH = 253 // bitcoind internal, for completeness
OP_PUBKEY = 254 // bitcoind internal, for completeness
OP_INVALIDOPCODE = 255 // bitcoind internal, for completeness
@ -622,6 +689,140 @@ var opcodemapPreinit = map[byte]*opcode{
opfunc: opcodeNop},
OP_NOP10: {value: OP_NOP10, name: "OP_NOP10", length: 1,
opfunc: opcodeNop},
OP_UNKNOWN186: {value: OP_UNKNOWN186, name: "OP_UNKNOWN186", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN187: {value: OP_UNKNOWN187, name: "OP_UNKNOWN187", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN188: {value: OP_UNKNOWN188, name: "OP_UNKNOWN188", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN189: {value: OP_UNKNOWN189, name: "OP_UNKNOWN189", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN190: {value: OP_UNKNOWN190, name: "OP_UNKNOWN190", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN191: {value: OP_UNKNOWN191, name: "OP_UNKNOWN191", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN192: {value: OP_UNKNOWN192, name: "OP_UNKNOWN192", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN193: {value: OP_UNKNOWN193, name: "OP_UNKNOWN193", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN194: {value: OP_UNKNOWN194, name: "OP_UNKNOWN194", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN195: {value: OP_UNKNOWN195, name: "OP_UNKNOWN195", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN196: {value: OP_UNKNOWN196, name: "OP_UNKNOWN196", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN197: {value: OP_UNKNOWN197, name: "OP_UNKNOWN197", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN198: {value: OP_UNKNOWN198, name: "OP_UNKNOWN198", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN199: {value: OP_UNKNOWN199, name: "OP_UNKNOWN199", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN200: {value: OP_UNKNOWN200, name: "OP_UNKNOWN200", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN201: {value: OP_UNKNOWN201, name: "OP_UNKNOWN201", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN202: {value: OP_UNKNOWN202, name: "OP_UNKNOWN202", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN203: {value: OP_UNKNOWN203, name: "OP_UNKNOWN203", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN204: {value: OP_UNKNOWN204, name: "OP_UNKNOWN204", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN205: {value: OP_UNKNOWN205, name: "OP_UNKNOWN205", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN206: {value: OP_UNKNOWN206, name: "OP_UNKNOWN206", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN207: {value: OP_UNKNOWN207, name: "OP_UNKNOWN207", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN208: {value: OP_UNKNOWN208, name: "OP_UNKNOWN208", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN209: {value: OP_UNKNOWN209, name: "OP_UNKNOWN209", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN210: {value: OP_UNKNOWN210, name: "OP_UNKNOWN210", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN211: {value: OP_UNKNOWN211, name: "OP_UNKNOWN211", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN212: {value: OP_UNKNOWN212, name: "OP_UNKNOWN212", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN213: {value: OP_UNKNOWN213, name: "OP_UNKNOWN213", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN214: {value: OP_UNKNOWN214, name: "OP_UNKNOWN214", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN215: {value: OP_UNKNOWN215, name: "OP_UNKNOWN215", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN216: {value: OP_UNKNOWN216, name: "OP_UNKNOWN216", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN217: {value: OP_UNKNOWN217, name: "OP_UNKNOWN217", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN218: {value: OP_UNKNOWN218, name: "OP_UNKNOWN218", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN219: {value: OP_UNKNOWN219, name: "OP_UNKNOWN219", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN220: {value: OP_UNKNOWN220, name: "OP_UNKNOWN220", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN221: {value: OP_UNKNOWN221, name: "OP_UNKNOWN221", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN222: {value: OP_UNKNOWN222, name: "OP_UNKNOWN222", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN223: {value: OP_UNKNOWN223, name: "OP_UNKNOWN223", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN224: {value: OP_UNKNOWN224, name: "OP_UNKNOWN224", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN225: {value: OP_UNKNOWN225, name: "OP_UNKNOWN225", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN226: {value: OP_UNKNOWN226, name: "OP_UNKNOWN226", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN227: {value: OP_UNKNOWN227, name: "OP_UNKNOWN227", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN228: {value: OP_UNKNOWN228, name: "OP_UNKNOWN228", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN229: {value: OP_UNKNOWN229, name: "OP_UNKNOWN229", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN230: {value: OP_UNKNOWN230, name: "OP_UNKNOWN230", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN231: {value: OP_UNKNOWN231, name: "OP_UNKNOWN231", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN232: {value: OP_UNKNOWN232, name: "OP_UNKNOWN232", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN233: {value: OP_UNKNOWN233, name: "OP_UNKNOWN233", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN234: {value: OP_UNKNOWN234, name: "OP_UNKNOWN234", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN235: {value: OP_UNKNOWN235, name: "OP_UNKNOWN235", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN236: {value: OP_UNKNOWN236, name: "OP_UNKNOWN236", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN237: {value: OP_UNKNOWN237, name: "OP_UNKNOWN237", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN238: {value: OP_UNKNOWN238, name: "OP_UNKNOWN238", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN239: {value: OP_UNKNOWN239, name: "OP_UNKNOWN239", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN240: {value: OP_UNKNOWN240, name: "OP_UNKNOWN240", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN241: {value: OP_UNKNOWN241, name: "OP_UNKNOWN241", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN242: {value: OP_UNKNOWN242, name: "OP_UNKNOWN242", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN243: {value: OP_UNKNOWN243, name: "OP_UNKNOWN243", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN244: {value: OP_UNKNOWN244, name: "OP_UNKNOWN244", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN245: {value: OP_UNKNOWN245, name: "OP_UNKNOWN245", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN246: {value: OP_UNKNOWN246, name: "OP_UNKNOWN246", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN247: {value: OP_UNKNOWN247, name: "OP_UNKNOWN247", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN248: {value: OP_UNKNOWN248, name: "OP_UNKNOWN248", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN249: {value: OP_UNKNOWN249, name: "OP_UNKNOWN249", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN250: {value: OP_UNKNOWN250, name: "OP_UNKNOWN250", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN251: {value: OP_UNKNOWN251, name: "OP_UNKNOWN251", length: 1,
opfunc: opcodeInvalid},
OP_UNKNOWN252: {value: OP_UNKNOWN252, name: "OP_UNKNOWN252", length: 1,
opfunc: opcodeInvalid},
OP_PUBKEYHASH: {value: OP_PUBKEYHASH, name: "OP_PUBKEYHASH", length: 1,
opfunc: opcodeInvalid},
OP_PUBKEY: {value: OP_PUBKEY, name: "OP_PUBKEY", length: 1,

View file

@ -3416,406 +3416,810 @@ var detailedTests = []detailedTest{
// Invalid Opcodes
{
name: "invalid opcode 186",
script: []byte{186},
script: []byte{btcscript.OP_UNKNOWN186},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN186",
},
{
name: "invalid opcode 187",
script: []byte{187},
script: []byte{btcscript.OP_UNKNOWN187},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN187",
},
{
name: "invalid opcode 188",
script: []byte{188},
script: []byte{btcscript.OP_UNKNOWN188},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN188",
},
{
name: "invalid opcode 189",
script: []byte{189},
script: []byte{btcscript.OP_UNKNOWN189},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN189",
},
{
name: "invalid opcode 190",
script: []byte{190},
script: []byte{btcscript.OP_UNKNOWN190},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN190",
},
{
name: "invalid opcode 191",
script: []byte{191},
script: []byte{btcscript.OP_UNKNOWN191},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN191",
},
{
name: "invalid opcode 192",
script: []byte{192},
script: []byte{btcscript.OP_UNKNOWN192},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN192",
},
{
name: "invalid opcode 193",
script: []byte{193},
script: []byte{btcscript.OP_UNKNOWN193},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN193",
},
{
name: "invalid opcode 194",
script: []byte{194},
script: []byte{btcscript.OP_UNKNOWN194},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN194",
},
{
name: "invalid opcode 195",
script: []byte{195},
script: []byte{btcscript.OP_UNKNOWN195},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN195",
},
{
name: "invalid opcode 196",
script: []byte{196},
script: []byte{btcscript.OP_UNKNOWN196},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN196",
},
{
name: "invalid opcode 197",
script: []byte{197},
script: []byte{btcscript.OP_UNKNOWN197},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN197",
},
{
name: "invalid opcode 198",
script: []byte{198},
script: []byte{btcscript.OP_UNKNOWN198},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN198",
},
{
name: "invalid opcode 199",
script: []byte{199},
script: []byte{btcscript.OP_UNKNOWN199},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN199",
},
{
name: "invalid opcode 200",
script: []byte{200},
script: []byte{btcscript.OP_UNKNOWN200},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN200",
},
{
name: "invalid opcode 201",
script: []byte{201},
script: []byte{btcscript.OP_UNKNOWN201},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN201",
},
{
name: "invalid opcode 202",
script: []byte{202},
script: []byte{btcscript.OP_UNKNOWN202},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN202",
},
{
name: "invalid opcode 203",
script: []byte{203},
script: []byte{btcscript.OP_UNKNOWN203},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN203",
},
{
name: "invalid opcode 204",
script: []byte{204},
script: []byte{btcscript.OP_UNKNOWN204},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN204",
},
{
name: "invalid opcode 205",
script: []byte{205},
script: []byte{btcscript.OP_UNKNOWN205},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN205",
},
{
name: "invalid opcode 206",
script: []byte{206},
script: []byte{btcscript.OP_UNKNOWN206},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN206",
},
{
name: "invalid opcode 207",
script: []byte{207},
script: []byte{btcscript.OP_UNKNOWN207},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN207",
},
{
name: "invalid opcode 208",
script: []byte{208},
script: []byte{btcscript.OP_UNKNOWN208},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN208",
},
{
name: "invalid opcode 209",
script: []byte{209},
script: []byte{btcscript.OP_UNKNOWN209},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN209",
},
{
name: "invalid opcode 210",
script: []byte{210},
script: []byte{btcscript.OP_UNKNOWN210},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN210",
},
{
name: "invalid opcode 211",
script: []byte{211},
script: []byte{btcscript.OP_UNKNOWN211},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN211",
},
{
name: "invalid opcode 212",
script: []byte{212},
script: []byte{btcscript.OP_UNKNOWN212},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN212",
},
{
name: "invalid opcode 213",
script: []byte{213},
script: []byte{btcscript.OP_UNKNOWN213},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN213",
},
{
name: "invalid opcode 214",
script: []byte{214},
script: []byte{btcscript.OP_UNKNOWN214},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN214",
},
{
name: "invalid opcode 215",
script: []byte{215},
script: []byte{btcscript.OP_UNKNOWN215},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN215",
},
{
name: "invalid opcode 216",
script: []byte{216},
script: []byte{btcscript.OP_UNKNOWN216},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN216",
},
{
name: "invalid opcode 217",
script: []byte{217},
script: []byte{btcscript.OP_UNKNOWN217},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN217",
},
{
name: "invalid opcode 218",
script: []byte{218},
script: []byte{btcscript.OP_UNKNOWN218},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN218",
},
{
name: "invalid opcode 219",
script: []byte{219},
script: []byte{btcscript.OP_UNKNOWN219},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN219",
},
{
name: "invalid opcode 220",
script: []byte{220},
script: []byte{btcscript.OP_UNKNOWN220},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN220",
},
{
name: "invalid opcode 221",
script: []byte{221},
script: []byte{btcscript.OP_UNKNOWN221},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN221",
},
{
name: "invalid opcode 222",
script: []byte{222},
script: []byte{btcscript.OP_UNKNOWN222},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN222",
},
{
name: "invalid opcode 223",
script: []byte{223},
script: []byte{btcscript.OP_UNKNOWN223},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN223",
},
{
name: "invalid opcode 224",
script: []byte{224},
script: []byte{btcscript.OP_UNKNOWN224},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN224",
},
{
name: "invalid opcode 225",
script: []byte{225},
script: []byte{btcscript.OP_UNKNOWN225},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN225",
},
{
name: "invalid opcode 226",
script: []byte{226},
script: []byte{btcscript.OP_UNKNOWN226},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN226",
},
{
name: "invalid opcode 227",
script: []byte{227},
script: []byte{btcscript.OP_UNKNOWN227},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN227",
},
{
name: "invalid opcode 228",
script: []byte{228},
script: []byte{btcscript.OP_UNKNOWN228},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN228",
},
{
name: "invalid opcode 229",
script: []byte{229},
script: []byte{btcscript.OP_UNKNOWN229},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN229",
},
{
name: "invalid opcode 230",
script: []byte{230},
script: []byte{btcscript.OP_UNKNOWN230},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN230",
},
{
name: "invalid opcode 231",
script: []byte{231},
script: []byte{btcscript.OP_UNKNOWN231},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN231",
},
{
name: "invalid opcode 232",
script: []byte{232},
script: []byte{btcscript.OP_UNKNOWN232},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN232",
},
{
name: "invalid opcode 233",
script: []byte{233},
script: []byte{btcscript.OP_UNKNOWN233},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN233",
},
{
name: "invalid opcode 234",
script: []byte{234},
script: []byte{btcscript.OP_UNKNOWN234},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN234",
},
{
name: "invalid opcode 235",
script: []byte{235},
script: []byte{btcscript.OP_UNKNOWN235},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN235",
},
{
name: "invalid opcode 236",
script: []byte{236},
script: []byte{btcscript.OP_UNKNOWN236},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN236",
},
{
name: "invalid opcode 237",
script: []byte{237},
script: []byte{btcscript.OP_UNKNOWN237},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN237",
},
{
name: "invalid opcode 238",
script: []byte{238},
script: []byte{btcscript.OP_UNKNOWN238},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN238",
},
{
name: "invalid opcode 239",
script: []byte{239},
script: []byte{btcscript.OP_UNKNOWN239},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN239",
},
{
name: "invalid opcode 240",
script: []byte{240},
script: []byte{btcscript.OP_UNKNOWN240},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN240",
},
{
name: "invalid opcode 241",
script: []byte{241},
script: []byte{btcscript.OP_UNKNOWN241},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN241",
},
{
name: "invalid opcode 242",
script: []byte{242},
script: []byte{btcscript.OP_UNKNOWN242},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN242",
},
{
name: "invalid opcode 243",
script: []byte{243},
script: []byte{btcscript.OP_UNKNOWN243},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN243",
},
{
name: "invalid opcode 244",
script: []byte{244},
script: []byte{btcscript.OP_UNKNOWN244},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN244",
},
{
name: "invalid opcode 245",
script: []byte{245},
script: []byte{btcscript.OP_UNKNOWN245},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN245",
},
{
name: "invalid opcode 246",
script: []byte{246},
script: []byte{btcscript.OP_UNKNOWN246},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN246",
},
{
name: "invalid opcode 247",
script: []byte{247},
script: []byte{btcscript.OP_UNKNOWN247},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN247",
},
{
name: "invalid opcode 248",
script: []byte{248},
script: []byte{btcscript.OP_UNKNOWN248},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN248",
},
{
name: "invalid opcode 249",
script: []byte{249},
script: []byte{btcscript.OP_UNKNOWN249},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN249",
},
{
name: "invalid opcode 250",
script: []byte{250},
script: []byte{btcscript.OP_UNKNOWN250},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN250",
},
{
name: "invalid opcode 251",
script: []byte{251},
script: []byte{btcscript.OP_UNKNOWN251},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN251",
},
{
name: "invalid opcode 252",
script: []byte{252},
script: []byte{btcscript.OP_UNKNOWN252},
expectedReturn: btcscript.StackErrInvalidOpcode,
disassemblyerr: btcscript.StackErrInvalidOpcode,
disassembly: "OP_UNKNOWN252",
},
{
name: "invalid opcode 186 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN186, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN186 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 187 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN187, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN187 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 188 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN188, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN188 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 189 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN189, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN189 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 190 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN190, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN190 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 191 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN191, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN191 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 192 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN192, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN192 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 193 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN193, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN193 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 194 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN194, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN194 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 195 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN195, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN195 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 196 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN196, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN196 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 197 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN197, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN197 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 198 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN198, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN198 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 199 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN199, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN199 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 200 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN200, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN200 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 201 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN201, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN201 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 202 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN202, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN202 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 203 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN203, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN203 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 204 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN204, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN204 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 205 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN205, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN205 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 206 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN206, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN206 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 207 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN207, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN207 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 208 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN208, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN208 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 209 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN209, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN209 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 210 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN210, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN210 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 211 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN211, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN211 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 212 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN212, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN212 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 213 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN213, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN213 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 214 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN214, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN214 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 215 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN215, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN215 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 216 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN216, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN216 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 217 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN217, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN217 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 218 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN218, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN218 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 219 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN219, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN219 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 220 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN220, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN220 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 221 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN221, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN221 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 222 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN222, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN222 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 223 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN223, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN223 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 224 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN224, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN224 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 225 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN225, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN225 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 226 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN226, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN226 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 227 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN227, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN227 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 228 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN228, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN228 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 229 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN229, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN229 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 230 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN230, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN230 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 231 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN231, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN231 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 232 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN232, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN232 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 233 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN233, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN233 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 234 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN234, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN234 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 235 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN235, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN235 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 236 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN236, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN236 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 237 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN237, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN237 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 238 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN238, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN238 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 239 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN239, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN239 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 240 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN240, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN240 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 241 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN241, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN241 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 242 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN242, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN242 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 243 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN243, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN243 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 244 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN244, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN244 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 245 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN245, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN245 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 246 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN246, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN246 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 247 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN247, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN247 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 248 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN248, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN248 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 249 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN249, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN249 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 250 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN250, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN250 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 251 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN251, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN251 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode 252 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN252, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN252 OP_ELSE OP_1 OP_ENDIF",
},
{
name: "invalid opcode OP_PUBKEY",
script: []byte{btcscript.OP_PUBKEY},

View file

@ -1355,9 +1355,9 @@ var removeOpcodeTests = []removeOpcodeTest{
},
removeOpcodeTest{
name: "invalid opcode",
before: []byte{186},
before: []byte{btcscript.OP_UNKNOWN186},
remove: btcscript.OP_CODESEPARATOR,
err: btcscript.StackErrInvalidOpcode,
after: []byte{btcscript.OP_UNKNOWN186},
},
removeOpcodeTest{
name: "invalid length (insruction)",
@ -1463,9 +1463,9 @@ var removeOpcodeByDataTests = []removeOpcodeByDataTest{
},
removeOpcodeByDataTest{
name: "invalid opcode ",
before: []byte{187},
before: []byte{btcscript.OP_UNKNOWN187},
remove: []byte{1, 2, 3, 4},
err: btcscript.StackErrInvalidOpcode,
after: []byte{btcscript.OP_UNKNOWN187},
},
removeOpcodeByDataTest{
name: "invalid length (instruction)",