2015-01-30 07:03:01 +01:00
|
|
|
// Copyright (c) 2013-2015 Conformal Systems LLC.
|
2013-06-12 23:35:27 +02:00
|
|
|
// Use of this source code is governed by an ISC
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2015-01-30 07:03:01 +01:00
|
|
|
package txscript
|
2013-06-12 23:35:27 +02:00
|
|
|
|
2015-04-20 21:16:46 +02:00
|
|
|
import "testing"
|
2013-06-26 23:11:54 +02:00
|
|
|
|
2014-12-20 08:34:39 +01:00
|
|
|
// TstMaxScriptSize makes the internal maxScriptSize constant available to the
|
|
|
|
// test package.
|
|
|
|
const TstMaxScriptSize = maxScriptSize
|
|
|
|
|
2015-02-25 02:11:57 +01:00
|
|
|
// TstHasCanoncialPushes makes the internal isCanonicalPush function available
|
|
|
|
// to the test package.
|
|
|
|
var TstHasCanonicalPushes = canonicalPush
|
|
|
|
|
|
|
|
// TstParseScript makes the internal parseScript function available to the
|
|
|
|
// test package.
|
|
|
|
var TstParseScript = parseScript
|
|
|
|
|
2013-06-12 23:35:27 +02:00
|
|
|
// this file is present to export some internal interfaces so that we can
|
|
|
|
// test them reliably.
|
|
|
|
|
2015-02-06 21:46:26 +01:00
|
|
|
func TestCheckPubKeyEncoding(t *testing.T) {
|
|
|
|
t.Parallel()
|
|
|
|
|
|
|
|
tests := []struct {
|
|
|
|
name string
|
|
|
|
key []byte
|
|
|
|
isValid bool
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
name: "uncompressed ok",
|
|
|
|
key: []byte{0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a,
|
|
|
|
0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e,
|
|
|
|
0xb6, 0x8a, 0x38, 0x2e, 0x97, 0xb1, 0x48, 0x2e, 0xca,
|
|
|
|
0xd7, 0xb1, 0x48, 0xa6, 0x90, 0x9a, 0x5c, 0xb2, 0xe0,
|
|
|
|
0xea, 0xdd, 0xfb, 0x84, 0xcc, 0xf9, 0x74, 0x44, 0x64,
|
|
|
|
0xf8, 0x2e, 0x16, 0x0b, 0xfa, 0x9b, 0x8b, 0x64, 0xf9,
|
|
|
|
0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56,
|
|
|
|
0xb4, 0x12, 0xa3,
|
|
|
|
},
|
|
|
|
isValid: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "compressed ok",
|
|
|
|
key: []byte{0x02, 0xce, 0x0b, 0x14, 0xfb, 0x84, 0x2b, 0x1b,
|
|
|
|
0xa5, 0x49, 0xfd, 0xd6, 0x75, 0xc9, 0x80, 0x75, 0xf1,
|
|
|
|
0x2e, 0x9c, 0x51, 0x0f, 0x8e, 0xf5, 0x2b, 0xd0, 0x21,
|
|
|
|
0xa9, 0xa1, 0xf4, 0x80, 0x9d, 0x3b, 0x4d,
|
|
|
|
},
|
|
|
|
isValid: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "compressed ok",
|
|
|
|
key: []byte{0x03, 0x26, 0x89, 0xc7, 0xc2, 0xda, 0xb1, 0x33,
|
|
|
|
0x09, 0xfb, 0x14, 0x3e, 0x0e, 0x8f, 0xe3, 0x96, 0x34,
|
|
|
|
0x25, 0x21, 0x88, 0x7e, 0x97, 0x66, 0x90, 0xb6, 0xb4,
|
|
|
|
0x7f, 0x5b, 0x2a, 0x4b, 0x7d, 0x44, 0x8e,
|
|
|
|
},
|
|
|
|
isValid: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "hybrid",
|
|
|
|
key: []byte{0x06, 0x79, 0xbe, 0x66, 0x7e, 0xf9, 0xdc, 0xbb,
|
|
|
|
0xac, 0x55, 0xa0, 0x62, 0x95, 0xce, 0x87, 0x0b, 0x07,
|
|
|
|
0x02, 0x9b, 0xfc, 0xdb, 0x2d, 0xce, 0x28, 0xd9, 0x59,
|
|
|
|
0xf2, 0x81, 0x5b, 0x16, 0xf8, 0x17, 0x98, 0x48, 0x3a,
|
|
|
|
0xda, 0x77, 0x26, 0xa3, 0xc4, 0x65, 0x5d, 0xa4, 0xfb,
|
|
|
|
0xfc, 0x0e, 0x11, 0x08, 0xa8, 0xfd, 0x17, 0xb4, 0x48,
|
|
|
|
0xa6, 0x85, 0x54, 0x19, 0x9c, 0x47, 0xd0, 0x8f, 0xfb,
|
|
|
|
0x10, 0xd4, 0xb8,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "empty.",
|
|
|
|
key: []byte{},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
}
|
2015-04-21 00:58:04 +02:00
|
|
|
vm := Engine{flags: ScriptVerifyStrictEncoding}
|
2015-02-06 21:46:26 +01:00
|
|
|
for _, test := range tests {
|
2015-04-20 22:28:00 +02:00
|
|
|
err := vm.checkPubKeyEncoding(test.key)
|
2015-02-06 21:46:26 +01:00
|
|
|
if err != nil && test.isValid {
|
|
|
|
t.Errorf("checkSignatureEncoding test '%s' failed "+
|
|
|
|
"when it should have succeeded: %v", test.name,
|
|
|
|
err)
|
|
|
|
} else if err == nil && !test.isValid {
|
|
|
|
t.Errorf("checkSignatureEncooding test '%s' succeeded "+
|
|
|
|
"when it should have failed", test.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestCheckSignatureEncoding(t *testing.T) {
|
|
|
|
t.Parallel()
|
|
|
|
|
|
|
|
tests := []struct {
|
|
|
|
name string
|
|
|
|
sig []byte
|
|
|
|
isValid bool
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
name: "valid signature.",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "empty.",
|
|
|
|
sig: []byte{},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "bad magic.",
|
|
|
|
sig: []byte{0x31, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "bad 1st int marker magic.",
|
|
|
|
sig: []byte{0x30, 0x44, 0x03, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "bad 2nd int marker.",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x03, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "short len",
|
|
|
|
sig: []byte{0x30, 0x43, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "long len",
|
|
|
|
sig: []byte{0x30, 0x45, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "long X",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x42, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "long Y",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x21, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "short Y",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x19, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "trailing crap.",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09, 0x01,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "X == N ",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48,
|
|
|
|
0xA0, 0x3B, 0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "X == N ",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48,
|
|
|
|
0xA0, 0x3B, 0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41,
|
|
|
|
0x42, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Y == N",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFE, 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48, 0xA0, 0x3B,
|
|
|
|
0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41, 0x41,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Y > N",
|
|
|
|
sig: []byte{0x30, 0x44, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFE, 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48, 0xA0, 0x3B,
|
|
|
|
0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41, 0x42,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "0 len X.",
|
|
|
|
sig: []byte{0x30, 0x24, 0x02, 0x00, 0x02, 0x20, 0x18, 0x15,
|
|
|
|
0x22, 0xec, 0x8e, 0xca, 0x07, 0xde, 0x48, 0x60, 0xa4,
|
|
|
|
0xac, 0xdd, 0x12, 0x90, 0x9d, 0x83, 0x1c, 0xc5, 0x6c,
|
|
|
|
0xbb, 0xac, 0x46, 0x22, 0x08, 0x22, 0x21, 0xa8, 0x76,
|
|
|
|
0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "0 len Y.",
|
|
|
|
sig: []byte{0x30, 0x24, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x00,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "extra R padding.",
|
|
|
|
sig: []byte{0x30, 0x45, 0x02, 0x21, 0x00, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x20, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "extra S padding.",
|
|
|
|
sig: []byte{0x30, 0x45, 0x02, 0x20, 0x4e, 0x45, 0xe1, 0x69,
|
|
|
|
0x32, 0xb8, 0xaf, 0x51, 0x49, 0x61, 0xa1, 0xd3, 0xa1,
|
|
|
|
0xa2, 0x5f, 0xdf, 0x3f, 0x4f, 0x77, 0x32, 0xe9, 0xd6,
|
|
|
|
0x24, 0xc6, 0xc6, 0x15, 0x48, 0xab, 0x5f, 0xb8, 0xcd,
|
|
|
|
0x41, 0x02, 0x21, 0x00, 0x18, 0x15, 0x22, 0xec, 0x8e, 0xca,
|
|
|
|
0x07, 0xde, 0x48, 0x60, 0xa4, 0xac, 0xdd, 0x12, 0x90,
|
|
|
|
0x9d, 0x83, 0x1c, 0xc5, 0x6c, 0xbb, 0xac, 0x46, 0x22,
|
|
|
|
0x08, 0x22, 0x21, 0xa8, 0x76, 0x8d, 0x1d, 0x09,
|
|
|
|
},
|
|
|
|
isValid: false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-04-21 00:58:04 +02:00
|
|
|
vm := Engine{flags: ScriptVerifyStrictEncoding}
|
2015-02-06 21:46:26 +01:00
|
|
|
for _, test := range tests {
|
2015-04-20 22:28:00 +02:00
|
|
|
err := vm.checkSignatureEncoding(test.sig)
|
2015-02-06 21:46:26 +01:00
|
|
|
if err != nil && test.isValid {
|
|
|
|
t.Errorf("checkSignatureEncoding test '%s' failed "+
|
|
|
|
"when it should have succeeded: %v", test.name,
|
|
|
|
err)
|
|
|
|
} else if err == nil && !test.isValid {
|
|
|
|
t.Errorf("checkSignatureEncooding test '%s' succeeded "+
|
|
|
|
"when it should have failed", test.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-12 23:35:27 +02:00
|
|
|
func TstRemoveOpcode(pkscript []byte, opcode byte) ([]byte, error) {
|
|
|
|
pops, err := parseScript(pkscript)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
pops = removeOpcode(pops, opcode)
|
2013-09-10 17:39:29 +02:00
|
|
|
return unparseScript(pops)
|
2013-06-12 23:35:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func TstRemoveOpcodeByData(pkscript []byte, data []byte) ([]byte, error) {
|
|
|
|
pops, err := parseScript(pkscript)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
pops = removeOpcodeByData(pops, data)
|
2013-09-10 17:39:29 +02:00
|
|
|
return unparseScript(pops)
|
2013-06-12 23:35:27 +02:00
|
|
|
}
|
|
|
|
|
2013-06-20 00:31:44 +02:00
|
|
|
// TestSetPC allows the test modules to set the program counter to whatever they
|
|
|
|
// want.
|
2015-04-20 22:28:00 +02:00
|
|
|
func (vm *Engine) TstSetPC(script, off int) {
|
|
|
|
vm.scriptIdx = script
|
|
|
|
vm.scriptOff = off
|
2013-06-20 00:31:44 +02:00
|
|
|
}
|
2013-06-26 23:11:54 +02:00
|
|
|
|
2013-06-28 01:46:34 +02:00
|
|
|
// Internal tests for opcodde parsing with bad data templates.
|
|
|
|
func TestParseOpcode(t *testing.T) {
|
2015-04-21 18:49:59 +02:00
|
|
|
// Deep copy the array.
|
|
|
|
fakeArray := opcodeArray
|
2013-06-28 01:46:34 +02:00
|
|
|
// wrong length -8.
|
2015-04-21 18:49:59 +02:00
|
|
|
fakeArray[OP_PUSHDATA4] = opcode{value: OP_PUSHDATA4,
|
2013-06-28 01:46:34 +02:00
|
|
|
name: "OP_PUSHDATA4", length: -8, opfunc: opcodePushData}
|
|
|
|
|
|
|
|
// this script would be fine if -8 was a valid length.
|
|
|
|
_, err := parseScriptTemplate([]byte{OP_PUSHDATA4, 0x1, 0x00, 0x00,
|
2015-04-21 18:49:59 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00}, &fakeArray)
|
2013-10-08 00:36:39 +02:00
|
|
|
if err == nil {
|
2015-04-21 18:49:59 +02:00
|
|
|
t.Errorf("no error with dodgy opcode array!")
|
2013-10-08 00:36:39 +02:00
|
|
|
}
|
2013-06-28 01:46:34 +02:00
|
|
|
}
|
2013-09-10 17:39:29 +02:00
|
|
|
|
|
|
|
type popTest struct {
|
|
|
|
name string
|
|
|
|
pop *parsedOpcode
|
|
|
|
expectedErr error
|
|
|
|
}
|
|
|
|
|
|
|
|
var popTests = []popTest{
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_FALSE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_FALSE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_FALSE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_FALSE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_1 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_1",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_1 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 2),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_2 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 2),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_2 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 3),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_3 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 2),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_3",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 3),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_3 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 4),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_4 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 3),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_4",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 4),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_4 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 5),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_5 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 4),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_5",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 5),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_5 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 6),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_6 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 5),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_6",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 6),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_6 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 7),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_7 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 6),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_7",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 7),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_7 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 8),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_8 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 7),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_8",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 8),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_8 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 9),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_9 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 8),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_9",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 9),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_9 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 10),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_10 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 9),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_10",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 10),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_10 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 11),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_11 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_11],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 10),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_11",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_11],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 11),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_11 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_11],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 12),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_12 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_12],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 11),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_12",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_12],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 12),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_12 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_12],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 13),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_13 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_13],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 12),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_13",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_13],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 13),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_13 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_13],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 14),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_14 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_14],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 13),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_14",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_14],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 14),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_14 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_14],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 15),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_15 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_15],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 14),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_15",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_15],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 15),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_15 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_15],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 16),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_16 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_16],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 15),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_16",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_16],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 16),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_16 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_16],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 17),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_17 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_17],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 16),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_17",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_17],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 17),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_17 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_17],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 18),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_18 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_18],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 17),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_18",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_18],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 18),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_18 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_18],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 19),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_19 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_19],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 18),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_19",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_19],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 19),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_19 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_19],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 20),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_20 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_20],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 19),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_20",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_20],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 20),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_20 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_20],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 21),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_21 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_21],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 20),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_21",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_21],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 21),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_21 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_21],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 22),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_22 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_22],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 21),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_22",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_22],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 22),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_22 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_22],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 23),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_23 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_23],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 22),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_23",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_23],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 23),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_23 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_23],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 24),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_24 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_24],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 23),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_24",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_24],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 24),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_24 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_24],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 25),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_25 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_25],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 24),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_25",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_25],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 25),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_25 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_25],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 26),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_26 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_26],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 25),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_26",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_26],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 26),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_26 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_26],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 27),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_27 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_27],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 26),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_27",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_27],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 27),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_27 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_27],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 28),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_28 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_28],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 27),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_28",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_28],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 28),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_28 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_28],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 29),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_29 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_29],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 28),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_29",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_29],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 29),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_29 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_29],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 30),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_30 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_30],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 29),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_30",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_30],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 30),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_30 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_30],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 31),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_31 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_31],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 30),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_31",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_31],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 31),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_31 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_31],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 32),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_32 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_32],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 31),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_32",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_32],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 32),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_32 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_32],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 33),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_33 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_33],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 32),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_33",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_33],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 33),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_33 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_33],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 34),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_34 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_34],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 33),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_34",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_34],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 34),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_34 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_34],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 35),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_35 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_35],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 34),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_35",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_35],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 35),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_35 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_35],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 36),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_36 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_36],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 35),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_36",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_36],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 36),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_36 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_36],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 37),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_37 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_37],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 36),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_37",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_37],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 37),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_37 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_37],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 38),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_38 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_38],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 37),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_38",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_38],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 38),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_38 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_38],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 39),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_39 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_39],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 38),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_39",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_39],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 39),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_39 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_39],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 40),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_40 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_40],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 39),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_40",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_40],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 40),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_40 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_40],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 41),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_41 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_41],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 40),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_41",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_41],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 41),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_41 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_41],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 42),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_42 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_42],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 41),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_42",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_42],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 42),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_42 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_42],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 43),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_43 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_43],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 42),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_43",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_43],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 43),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_43 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_43],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 44),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_44 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_44],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 43),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_44",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_44],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 44),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_44 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_44],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 45),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_45 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_45],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 44),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_45",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_45],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 45),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_45 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_45],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 46),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_46 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_46],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 45),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_46",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_46],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 46),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_46 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_46],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 47),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_47 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_47],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 46),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_47",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_47],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 47),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_47 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_47],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 48),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_48 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_48],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 47),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_48",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_48],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 48),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_48 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_48],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 49),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_49 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_49],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 48),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_49",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_49],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 49),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_49 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_49],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 50),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_50 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_50],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 49),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_50",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_50],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 50),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_50 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_50],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 51),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_51 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_51],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 50),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_51",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_51],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 51),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_51 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_51],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 52),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_52 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_52],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 51),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_52",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_52],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 52),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_52 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_52],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 53),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_53 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_53],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 52),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_53",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_53],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 53),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_53 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_53],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 54),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_54 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_54],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 53),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_54",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_54],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 54),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_54 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_54],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 55),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_55 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_55],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 54),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_55",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_55],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 55),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_55 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_55],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 56),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_56 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_56],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 55),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_56",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_56],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 56),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_56 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_56],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 57),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_57 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_57],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 56),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_57",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_57],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 57),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_57 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_57],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 58),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_58 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_58],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 57),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_58",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_58],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 58),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_58 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_58],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 59),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_59 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_59],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 58),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_59",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_59],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 59),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_59 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_59],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 60),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_60 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_60],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 59),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_60",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_60],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 60),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_60 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_60],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 61),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_61 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_61],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 60),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_61",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_61],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 61),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_61 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_61],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 62),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_62 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_62],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 61),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_62",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_62],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 62),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_62 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_62],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 63),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_63 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_63],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 62),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_63",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_63],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 63),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_63 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_63],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 64),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_64 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_64],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 63),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_64",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_64],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 64),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_64 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_64],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 65),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_65 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_65],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 64),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_65",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_65],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 65),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_65 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_65],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 66),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_66 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_66],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 65),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_66",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_66],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 66),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_66 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_66],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 67),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_67 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_67],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 66),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_67",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_67],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 67),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_67 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_67],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 68),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_68 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_68],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 67),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_68",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_68],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 68),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_68 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_68],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 69),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_69 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_69],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 68),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_69",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_69],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 69),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_69 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_69],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 70),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_70 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_70],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 69),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_70",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_70],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 70),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_70 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_70],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 71),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_71 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_71],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 70),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_71",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_71],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 71),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_71 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_71],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 72),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_72 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_72],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 71),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_72",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_72],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 72),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_72 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_72],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 73),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_73 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_73],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 72),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_73",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_73],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 73),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_73 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_73],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 74),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_74 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_74],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 73),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_74",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_74],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 74),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_74 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_74],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 75),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_75 short",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_75],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 74),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_75",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_75],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 75),
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DATA_75 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DATA_75],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 76),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUSHDATA1",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUSHDATA1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: []byte{0, 1, 2, 3, 4},
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUSHDATA2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUSHDATA2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: []byte{0, 1, 2, 3, 4},
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUSHDATA4",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUSHDATA1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: []byte{0, 1, 2, 3, 4},
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1NEGATE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1NEGATE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1NEGATE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1NEGATE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TRUE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TRUE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TRUE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TRUE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_3",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_3 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_4",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_4 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_5",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_5 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_6",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_6 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_7",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_7 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_8",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_8 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_9",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_9 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_10",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_10 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_11",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_11],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_11 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_11],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_12",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_12],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_12 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_12],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_13",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_13],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_13 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_13],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_14",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_14],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_14 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_14],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_15",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_15],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_15 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_15],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_16",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_16],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_16 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_16],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VER",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VER long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_IF",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_IF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_IF long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_IF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOTIF",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOTIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOTIF long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOTIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERIF",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERIF long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERNOTIF",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERNOTIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERNOTIF long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERNOTIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ELSE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ELSE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ELSE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ELSE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ENDIF",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ENDIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ENDIF long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ENDIF],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERIFY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_VERIFY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_VERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RETURN",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RETURN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RETURN long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RETURN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TOALTSTACK",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TOALTSTACK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TOALTSTACK long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TOALTSTACK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_FROMALTSTACK",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_FROMALTSTACK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_FROMALTSTACK long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_FROMALTSTACK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DROP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DROP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DROP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DROP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DUP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DUP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_3DUP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_3DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_3DUP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_3DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2OVER",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2OVER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2OVER long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2OVER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2ROT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2ROT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2ROT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2ROT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2SWAP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2SWAP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2SWAP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2SWAP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_IFDUP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_IFDUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_IFDUP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_IFDUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DEPTH",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DEPTH],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DEPTH long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DEPTH],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DROP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DROP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DROP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DROP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DUP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DUP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DUP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NIP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NIP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NIP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NIP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_OVER",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_OVER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_OVER long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_OVER],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PICK",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PICK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PICK long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PICK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ROLL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ROLL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ROLL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ROLL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ROT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ROT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ROT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ROT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SWAP",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SWAP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SWAP long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SWAP],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TUCK",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TUCK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_TUCK long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_TUCK],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CAT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CAT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CAT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CAT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SUBSTR",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SUBSTR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SUBSTR long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SUBSTR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LEFT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LEFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LEFT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LEFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LEFT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LEFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LEFT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LEFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RIGHT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RIGHT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RIGHT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RIGHT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SIZE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SIZE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SIZE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SIZE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_INVERT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_INVERT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_INVERT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_INVERT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_AND",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_AND],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_AND long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_AND],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_OR",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_OR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_OR long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_OR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_XOR",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_XOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_XOR long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_XOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_EQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_EQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_EQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_EQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_EQUALVERIFY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_EQUALVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_EQUALVERIFY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_EQUALVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED1",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED1 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RESERVED2 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RESERVED2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1ADD",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1ADD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1ADD long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1ADD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1SUB",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1SUB],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_1SUB long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_1SUB],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2MUL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2MUL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2MUL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2MUL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DIV",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DIV],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_2DIV long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_2DIV],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NEGATE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NEGATE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NEGATE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NEGATE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ABS",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ABS],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ABS long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ABS],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_0NOTEQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_0NOTEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_0NOTEQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_0NOTEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ADD",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ADD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_ADD long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_ADD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SUB",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SUB],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SUB long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SUB],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MUL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MUL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MUL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MUL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DIV",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DIV],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_DIV long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_DIV],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MOD",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MOD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MOD long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MOD],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LSHIFT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LSHIFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LSHIFT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LSHIFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RSHIFT",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RSHIFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RSHIFT long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RSHIFT],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_BOOLAND",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_BOOLAND],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_BOOLAND long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_BOOLAND],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_BOOLOR",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_BOOLOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_BOOLOR long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_BOOLOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMEQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMEQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMEQUALVERIFY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMEQUALVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMEQUALVERIFY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMEQUALVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMNOTEQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMNOTEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NUMNOTEQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NUMNOTEQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LESSTHAN",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LESSTHAN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LESSTHAN long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LESSTHAN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_GREATERTHAN",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_GREATERTHAN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_GREATERTHAN long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_GREATERTHAN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LESSTHANOREQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LESSTHANOREQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_LESSTHANOREQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_LESSTHANOREQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_GREATERTHANOREQUAL",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_GREATERTHANOREQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_GREATERTHANOREQUAL long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_GREATERTHANOREQUAL],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MIN",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MIN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MIN long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MIN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MAX",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MAX],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_MAX long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_MAX],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_WITHIN",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_WITHIN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_WITHIN long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_WITHIN],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RIPEMD160",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RIPEMD160],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_RIPEMD160 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_RIPEMD160],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SHA1",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SHA1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SHA1 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SHA1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SHA256",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SHA256],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_SHA256 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_SHA256],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_HASH160",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_HASH160],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_HASH160 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_HASH160],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_HASH256",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_HASH256],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_HASH256 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_HASH256],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CODESAPERATOR",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CODESEPARATOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CODESEPARATOR long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CODESEPARATOR],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKSIG",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKSIG],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKSIG long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKSIG],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKSIGVERIFY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKSIGVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKSIGVERIFY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKSIGVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2014-01-04 22:13:29 +01:00
|
|
|
name: "OP_CHECKMULTISIG",
|
2013-09-10 17:39:29 +02:00
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKMULTISIG],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2014-01-04 22:13:29 +01:00
|
|
|
name: "OP_CHECKMULTISIG long",
|
2013-09-10 17:39:29 +02:00
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKMULTISIG],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKMULTISIGVERIFY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKMULTISIGVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_CHECKMULTISIGVERIFY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_CHECKMULTISIGVERIFY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP1",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP1 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP1],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP2",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP2 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP2],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP3",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP3 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP3],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP4",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP4 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP4],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP5",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP5 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP5],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP6",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP6 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP6],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP7",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP7 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP7],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP8",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP8 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP8],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP9",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP9 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP9],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP10",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_NOP10 long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_NOP10],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUBKEYHASH",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUBKEYHASH],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUBKEYHASH long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUBKEYHASH],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUBKEY",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUBKEY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_PUBKEY long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_PUBKEY],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_INVALIDOPCODE",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_INVALIDOPCODE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: nil,
|
|
|
|
},
|
|
|
|
expectedErr: nil,
|
|
|
|
},
|
2014-02-04 22:18:37 +01:00
|
|
|
{
|
2013-09-10 17:39:29 +02:00
|
|
|
name: "OP_INVALIDOPCODE long",
|
|
|
|
pop: &parsedOpcode{
|
2015-04-21 18:49:59 +02:00
|
|
|
opcode: &opcodeArray[OP_INVALIDOPCODE],
|
2013-09-10 17:39:29 +02:00
|
|
|
data: make([]byte, 1),
|
|
|
|
},
|
2014-10-12 23:40:09 +02:00
|
|
|
expectedErr: ErrStackInvalidOpcode,
|
2013-09-10 17:39:29 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestUnparsingInvalidOpcodes(t *testing.T) {
|
|
|
|
for _, test := range popTests {
|
|
|
|
_, err := test.pop.bytes()
|
|
|
|
if err != test.expectedErr {
|
|
|
|
t.Errorf("Parsed Opcode test '%s' failed", test.name)
|
|
|
|
t.Error(err, test.expectedErr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|