Index: src/script/interpreter.cpp =================================================================== --- src/script/interpreter.cpp +++ src/script/interpreter.cpp @@ -315,6 +315,7 @@ } int nOpCount = 0; bool fRequireMinimal = (flags & SCRIPT_VERIFY_MINIMALDATA) != 0; + bool fEnabledOpCodes0 = (flags & SCRIPT_ENABLE_OPCODES0) != 0; try { while (pc < pend) { @@ -335,10 +336,24 @@ return set_error(serror, SCRIPT_ERR_OP_COUNT); } - if (opcode == OP_INVERT || opcode == OP_2MUL || opcode == OP_2DIV || - opcode == OP_MUL || opcode == OP_LSHIFT || opcode == OP_RSHIFT) { - // Disabled opcodes. - return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); + // May 15 2018 HF activates AND, OR, XOR, DIV, MOD, CAT, and SPLIT + if (fEnabledOpCodes0) { + if (opcode == OP_INVERT || opcode == OP_2MUL || opcode == OP_2DIV || + opcode == OP_MUL || opcode == OP_LSHIFT || opcode == OP_RSHIFT) { + // Disabled opcodes. + return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); + } + } + else { + if (opcode == OP_CAT || opcode == OP_SPLIT || opcode == OP_BIN2NUM || + opcode == OP_NUM2BIN || opcode == OP_INVERT || opcode == OP_AND || + opcode == OP_OR || opcode == OP_XOR || opcode == OP_2MUL || + opcode == OP_2DIV || opcode == OP_MUL || opcode == OP_DIV || + opcode == OP_MOD || opcode == OP_LSHIFT || + opcode == OP_RSHIFT) { + // Disabled opcodes. + return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); + } } if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) { Index: src/validation.cpp =================================================================== --- src/validation.cpp +++ src/validation.cpp @@ -1897,7 +1897,7 @@ // Once the the 15 May 2018 hardfork activates we may begin using new opcodes. // Therefore script flags need to be passed to the interpreter allowing this. if (IsForkMay152018Enabled(config, pindex->pprev)) { - //flags |= SCRIPT_ENABLE_OPCODES0; // Note this will be uncommented in a later commit + flags |= SCRIPT_ENABLE_OPCODES0; } return flags;