fix disabled opcodes comparison.
This commit is contained in:
parent
1513f06bce
commit
ab68e23238
@ -1077,21 +1077,21 @@ Script.prototype.execute = function execute(stack, flags, tx, index, version) {
|
|||||||
// are in unexecuted branches of code_. Whereas
|
// are in unexecuted branches of code_. Whereas
|
||||||
// a totally unknown opcode is fine as long as it
|
// a totally unknown opcode is fine as long as it
|
||||||
// is unexecuted.
|
// is unexecuted.
|
||||||
if (op == opcodes.OP_CAT
|
if (op === opcodes.OP_CAT
|
||||||
|| op == opcodes.OP_SUBSTR
|
|| op === opcodes.OP_SUBSTR
|
||||||
|| op == opcodes.OP_LEFT
|
|| op === opcodes.OP_LEFT
|
||||||
|| op == opcodes.OP_RIGHT
|
|| op === opcodes.OP_RIGHT
|
||||||
|| op == opcodes.OP_INVERT
|
|| op === opcodes.OP_INVERT
|
||||||
|| op == opcodes.OP_AND
|
|| op === opcodes.OP_AND
|
||||||
|| op == opcodes.OP_OR
|
|| op === opcodes.OP_OR
|
||||||
|| op == opcodes.OP_XOR
|
|| op === opcodes.OP_XOR
|
||||||
|| op == opcodes.OP_2MUL
|
|| op === opcodes.OP_2MUL
|
||||||
|| op == opcodes.OP_2DIV
|
|| op === opcodes.OP_2DIV
|
||||||
|| op == opcodes.OP_MUL
|
|| op === opcodes.OP_MUL
|
||||||
|| op == opcodes.OP_DIV
|
|| op === opcodes.OP_DIV
|
||||||
|| op == opcodes.OP_MOD
|
|| op === opcodes.OP_MOD
|
||||||
|| op == opcodes.OP_LSHIFT
|
|| op === opcodes.OP_LSHIFT
|
||||||
|| op == opcodes.OP_RSHIFT) {
|
|| op === opcodes.OP_RSHIFT) {
|
||||||
throw new ScriptError('DISABLED_OPCODE', op, ip);
|
throw new ScriptError('DISABLED_OPCODE', op, ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user