Script: add opcode name to disabled opcode exception message

This commit is contained in:
Marko Lazaric 2021-11-05 00:06:46 +00:00 committed by Andreas Schildbach
parent cc64779e28
commit 964adb1e63

View file

@ -796,7 +796,8 @@ public class Script {
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)
throw new ScriptException(ScriptError.SCRIPT_ERR_DISABLED_OPCODE, "Script included a disabled Script Op.");
throw new ScriptException(ScriptError.SCRIPT_ERR_DISABLED_OPCODE,
"Script included disabled Script Op " + ScriptOpCodes.getOpCodeName(opcode));
if (shouldExecute && OP_0 <= opcode && opcode <= OP_PUSHDATA4) {
// Check minimal push