fix disabled opcodes comparison.

This commit is contained in:
Christopher Jeffrey 2016-05-15 21:58:54 -07:00
parent 1513f06bce
commit ab68e23238
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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);
} }