script: remove disabled ops permanently.
This commit is contained in:
parent
a1e9999f29
commit
85ec9ae2c3
@ -927,7 +927,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
}
|
||||
case opcodes.OP_EQUAL:
|
||||
case opcodes.OP_EQUALVERIFY: {
|
||||
// case opcodes.OP_NOTEQUAL: // use OP_NUMNOTEQUAL
|
||||
if (stack.length < 2)
|
||||
throw new ScriptError('INVALID_STACK_OPERATION', op, ip);
|
||||
|
||||
@ -936,9 +935,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
|
||||
res = util.equal(v1, v2);
|
||||
|
||||
// if (op.value == opcodes.OP_NOTEQUAL)
|
||||
// res = !res;
|
||||
|
||||
stack.pop();
|
||||
stack.pop();
|
||||
|
||||
@ -954,8 +950,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
}
|
||||
case opcodes.OP_1ADD:
|
||||
case opcodes.OP_1SUB:
|
||||
case opcodes.OP_2MUL:
|
||||
case opcodes.OP_2DIV:
|
||||
case opcodes.OP_NEGATE:
|
||||
case opcodes.OP_ABS:
|
||||
case opcodes.OP_NOT:
|
||||
@ -972,18 +966,11 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
case opcodes.OP_1SUB:
|
||||
num.isubn(1);
|
||||
break;
|
||||
case opcodes.OP_2MUL:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_2DIV:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_NEGATE:
|
||||
num.ineg();
|
||||
break;
|
||||
case opcodes.OP_ABS:
|
||||
if (num.cmpn(0) < 0)
|
||||
num.ineg();
|
||||
num.iabs();
|
||||
break;
|
||||
case opcodes.OP_NOT:
|
||||
num = num.cmpn(0) === 0;
|
||||
@ -1005,11 +992,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
}
|
||||
case opcodes.OP_ADD:
|
||||
case opcodes.OP_SUB:
|
||||
case opcodes.OP_MUL:
|
||||
case opcodes.OP_DIV:
|
||||
case opcodes.OP_MOD:
|
||||
case opcodes.OP_LSHIFT:
|
||||
case opcodes.OP_RSHIFT:
|
||||
case opcodes.OP_BOOLAND:
|
||||
case opcodes.OP_BOOLOR:
|
||||
case opcodes.OP_NUMEQUAL:
|
||||
@ -1034,21 +1016,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
case opcodes.OP_SUB:
|
||||
num = n1.isub(n2);
|
||||
break;
|
||||
case opcodes.OP_MUL:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_DIV:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_MOD:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_LSHIFT:
|
||||
asssert(false);
|
||||
break;
|
||||
case opcodes.OP_RSHIFT:
|
||||
assert(false);
|
||||
break;
|
||||
case opcodes.OP_BOOLAND:
|
||||
num = n1.cmpn(0) !== 0 && n2.cmpn(0) !== 0;
|
||||
num = new BN(num ? 1 : 0);
|
||||
@ -1310,29 +1277,6 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
|
||||
|
||||
break;
|
||||
}
|
||||
case opcodes.OP_CAT: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
case opcodes.OP_SUBSTR: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
case opcodes.OP_LEFT:
|
||||
case opcodes.OP_RIGHT: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
case opcodes.OP_INVERT: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
case opcodes.OP_AND:
|
||||
case opcodes.OP_OR:
|
||||
case opcodes.OP_XOR: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new ScriptError('BAD_OPCODE', op, ip);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user