Make opcode disasm names match reference impl.

This commit modifies the names of opcdoes shown in the oneline script
disassembly to match the reference implementation.  In particular
OP_1NEGATE, and OP_0 through OP_16 are changed to the raw numbers
they represent when doing oneline disassembly.  When doing full
disassembly, the full opcode names are still shown.

ok @owainga.
This commit is contained in:
Dave Collins 2014-01-06 20:43:52 -06:00
parent e2f14e2cfa
commit 126991b60b
3 changed files with 126 additions and 89 deletions

View file

@ -831,6 +831,31 @@ var opcodemapPreinit = map[byte]*opcode{
opfunc: opcodeInvalid},
}
// opcodeOnelineRepls defines opcode names which are replaced when doing a
// one-line disassembly. This is done to match the output of the reference
// implementation while not changing the opcode names in the nicer full
// disassembly.
var opcodeOnelineRepls = map[string]string{
"OP_1NEGATE": "-1",
"OP_0": "0",
"OP_1": "1",
"OP_2": "2",
"OP_3": "3",
"OP_4": "4",
"OP_5": "5",
"OP_6": "6",
"OP_7": "7",
"OP_8": "8",
"OP_9": "9",
"OP_10": "10",
"OP_11": "11",
"OP_12": "12",
"OP_13": "13",
"OP_14": "14",
"OP_15": "15",
"OP_16": "16",
}
type parsedOpcode struct {
opcode *opcode
data []byte
@ -868,7 +893,19 @@ func (pop *parsedOpcode) exec(s *Script) error {
}
func (pop *parsedOpcode) print(oneline bool) string {
retString := pop.opcode.name
// The reference implementation one-line disassembly replaces opcodes
// which represent values (e.g. OP_0 through OP_16 and OP_1NEGATE)
// with the raw value. However, when not doing a one-line dissassembly,
// we prefer to show the actual opcode names. Thus, only replace the
// opcodes in question when the oneline flag is set.
opcodeName := pop.opcode.name
if oneline {
if replName, ok := opcodeOnelineRepls[opcodeName]; ok {
opcodeName = replName
}
}
retString := opcodeName
if pop.opcode.length == 1 {
return retString
}

View file

@ -998,14 +998,14 @@ var detailedTests = []detailedTest{
before: [][]byte{},
script: []byte{btcscript.OP_1NEGATE},
after: [][]byte{{0x81}},
disassembly: "OP_1NEGATE",
disassembly: "-1",
},
{
name: "add one to minus one",
before: [][]byte{},
script: []byte{btcscript.OP_1NEGATE, btcscript.OP_1ADD},
after: [][]byte{{}}, // 0
disassembly: "OP_1NEGATE OP_1ADD",
disassembly: "-1 OP_1ADD",
},
{
name: "OP_ABS (positive)",
@ -2132,7 +2132,7 @@ var detailedTests = []detailedTest{
name: "OP_CHECKSIG one arg",
script: []byte{btcscript.OP_1, btcscript.OP_CHECKSIG},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 OP_CHECKSIG",
disassembly: "1 OP_CHECKSIG",
nSigOps: 1,
nPreciseSigOps: 1,
},
@ -2149,7 +2149,7 @@ var detailedTests = []detailedTest{
script: []byte{btcscript.OP_1,
btcscript.OP_CHECKSIGVERIFY},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 OP_CHECKSIGVERIFY",
disassembly: "1 OP_CHECKSIGVERIFY",
nSigOps: 1,
nPreciseSigOps: 1,
},
@ -2193,7 +2193,7 @@ var detailedTests = []detailedTest{
script: []byte{btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 OP_CHECKMULTISIG",
disassembly: "1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2213,7 +2213,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIG",
disassembly: "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2235,7 +2235,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
expectedReturn: btcscript.StackErrNumberTooBig,
disassembly: "010203040506070809 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIG",
disassembly: "010203040506070809 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2254,7 +2254,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIG",
disassembly: "1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2284,7 +2284,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
after: [][]byte{{0}},
disassembly: "OP_1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 OP_1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIG",
disassembly: "1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2307,7 +2307,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1, btcscript.OP_1,
btcscript.OP_CHECKMULTISIG},
after: [][]byte{{0}},
disassembly: "OP_1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 OP_1 OP_1 OP_1 OP_CHECKMULTISIG",
disassembly: "1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 1 1 1 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2345,7 +2345,7 @@ var detailedTests = []detailedTest{
script: []byte{btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2365,7 +2365,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2386,7 +2386,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrNumberTooBig,
disassembly: "010203040506070809 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "010203040506070809 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2405,7 +2405,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrUnderflow,
disassembly: "OP_1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2435,7 +2435,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrVerifyFailed,
disassembly: "OP_1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 OP_1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 1 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c 1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2458,7 +2458,7 @@ var detailedTests = []detailedTest{
btcscript.OP_1, btcscript.OP_1,
btcscript.OP_CHECKMULTISIGVERIFY},
expectedReturn: btcscript.StackErrVerifyFailed,
disassembly: "OP_1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 OP_1 OP_1 OP_1 OP_CHECKMULTISIGVERIFY",
disassembly: "1 304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901 1 1 1 OP_CHECKMULTISIGVERIFY",
nSigOps: 20,
nPreciseSigOps: 1,
},
@ -2669,7 +2669,7 @@ var detailedTests = []detailedTest{
btcscript.OP_DUP,
},
after: [][]byte{{1}, {1}},
disassembly: "OP_1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP",
disassembly: "1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP",
},
{
// 202 operations + one push
@ -2879,7 +2879,7 @@ var detailedTests = []detailedTest{
btcscript.OP_DROP,
},
expectedReturn: btcscript.StackErrTooManyOperations,
disassembly: "OP_1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP",
disassembly: "1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP",
},
{
// 202 operations + one push
@ -3093,7 +3093,7 @@ var detailedTests = []detailedTest{
btcscript.OP_CHECKMULTISIG,
},
expectedReturn: btcscript.StackErrTooManyOperations,
disassembly: "OP_1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_1 OP_1 OP_1 OP_1 OP_2 OP_CHECKMULTISIG",
disassembly: "1 OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP OP_DUP OP_DROP 1 1 1 1 2 OP_CHECKMULTISIG",
nSigOps: 20,
nPreciseSigOps: 2,
},
@ -3828,403 +3828,403 @@ var detailedTests = []detailedTest{
name: "invalid opcode 186 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN186, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN186 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN186 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 187 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN187, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN187 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN187 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 188 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN188, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN188 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN188 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 189 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN189, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN189 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN189 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 190 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN190, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN190 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN190 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 191 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN191, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN191 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN191 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 192 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN192, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN192 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN192 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 193 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN193, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN193 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN193 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 194 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN194, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN194 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN194 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 195 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN195, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN195 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN195 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 196 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN196, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN196 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN196 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 197 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN197, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN197 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN197 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 198 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN198, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN198 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN198 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 199 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN199, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN199 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN199 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 200 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN200, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN200 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN200 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 201 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN201, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN201 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN201 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 202 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN202, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN202 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN202 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 203 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN203, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN203 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN203 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 204 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN204, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN204 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN204 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 205 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN205, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN205 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN205 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 206 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN206, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN206 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN206 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 207 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN207, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN207 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN207 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 208 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN208, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN208 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN208 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 209 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN209, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN209 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN209 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 210 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN210, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN210 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN210 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 211 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN211, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN211 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN211 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 212 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN212, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN212 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN212 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 213 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN213, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN213 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN213 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 214 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN214, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN214 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN214 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 215 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN215, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN215 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN215 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 216 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN216, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN216 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN216 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 217 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN217, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN217 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN217 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 218 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN218, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN218 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN218 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 219 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN219, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN219 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN219 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 220 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN220, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN220 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN220 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 221 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN221, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN221 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN221 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 222 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN222, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN222 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN222 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 223 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN223, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN223 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN223 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 224 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN224, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN224 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN224 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 225 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN225, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN225 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN225 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 226 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN226, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN226 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN226 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 227 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN227, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN227 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN227 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 228 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN228, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN228 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN228 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 229 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN229, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN229 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN229 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 230 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN230, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN230 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN230 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 231 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN231, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN231 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN231 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 232 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN232, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN232 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN232 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 233 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN233, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN233 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN233 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 234 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN234, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN234 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN234 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 235 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN235, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN235 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN235 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 236 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN236, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN236 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN236 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 237 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN237, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN237 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN237 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 238 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN238, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN238 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN238 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 239 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN239, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN239 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN239 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 240 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN240, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN240 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN240 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 241 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN241, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN241 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN241 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 242 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN242, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN242 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN242 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 243 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN243, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN243 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN243 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 244 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN244, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN244 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN244 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 245 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN245, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN245 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN245 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 246 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN246, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN246 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN246 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 247 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN247, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN247 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN247 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 248 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN248, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN248 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN248 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 249 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN249, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN249 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN249 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 250 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN250, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN250 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN250 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 251 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN251, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN251 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN251 OP_ELSE 1 OP_ENDIF",
},
{
name: "invalid opcode 252 if noexec",
script: []byte{btcscript.OP_FALSE, btcscript.OP_IF, btcscript.OP_UNKNOWN252, btcscript.OP_ELSE, btcscript.OP_TRUE, btcscript.OP_ENDIF},
after: [][]byte{{0x01}},
disassembly: "OP_0 OP_IF OP_UNKNOWN252 OP_ELSE OP_1 OP_ENDIF",
disassembly: "0 OP_IF OP_UNKNOWN252 OP_ELSE 1 OP_ENDIF",
},
{

View file

@ -6,13 +6,13 @@ github.com/conformal/btcscript/script.go CalcScriptInfo 100.00% (25/25)
github.com/conformal/btcscript/opcode.go parsedOpcode.bytes 100.00% (23/23)
github.com/conformal/btcscript/script.go NewScript 100.00% (21/21)
github.com/conformal/btcscript/stack.go asInt 100.00% (21/21)
github.com/conformal/btcscript/opcode.go parsedOpcode.print 100.00% (16/16)
github.com/conformal/btcscript/script.go signatureScriptCustomReader 100.00% (16/16)
github.com/conformal/btcscript/stack.go Stack.nipN 100.00% (14/14)
github.com/conformal/btcscript/stack.go fromInt 100.00% (14/14)
github.com/conformal/btcscript/script.go GetPreciseSigOpCount 100.00% (13/13)
github.com/conformal/btcscript/opcode.go opcodeWithin 100.00% (13/13)
github.com/conformal/btcscript/script.go isMultiSig 100.00% (13/13)
github.com/conformal/btcscript/opcode.go parsedOpcode.print 100.00% (12/12)
github.com/conformal/btcscript/opcode.go opcodeIf 100.00% (11/11)
github.com/conformal/btcscript/opcode.go opcodeNotIf 100.00% (11/11)
github.com/conformal/btcscript/opcode.go opcodeGreaterThanOrEqual 100.00% (10/10)
@ -155,5 +155,5 @@ github.com/conformal/btcscript/script.go CalcMultiSigStats 0.00% (0/8)
github.com/conformal/btcscript/script.go IsPushOnlyScript 0.00% (0/4)
github.com/conformal/btcscript/log.go logClosure.String 0.00% (0/1)
github.com/conformal/btcscript/log.go UseLogger 0.00% (0/1)
github.com/conformal/btcscript --------------------------- 93.78% (995/1061)
github.com/conformal/btcscript --------------------------- 93.80% (999/1065)