MCPcopy Index your code
hub / github.com/btcsuite/btcd / isOpcodeDisabled

Function isOpcodeDisabled

txscript/engine.go:340–375  ·  view source on GitHub ↗

isOpcodeDisabled returns whether or not the opcode is disabled and thus is always bad to see in the instruction stream (even if turned off by a conditional).

(opcode byte)

Source from the content-addressed store, hash-verified

338// always bad to see in the instruction stream (even if turned off by a
339// conditional).
340func isOpcodeDisabled(opcode byte) bool {
341 switch opcode {
342 case OP_CAT:
343 return true
344 case OP_SUBSTR:
345 return true
346 case OP_LEFT:
347 return true
348 case OP_RIGHT:
349 return true
350 case OP_INVERT:
351 return true
352 case OP_AND:
353 return true
354 case OP_OR:
355 return true
356 case OP_XOR:
357 return true
358 case OP_2MUL:
359 return true
360 case OP_2DIV:
361 return true
362 case OP_MUL:
363 return true
364 case OP_DIV:
365 return true
366 case OP_MOD:
367 return true
368 case OP_LSHIFT:
369 return true
370 case OP_RSHIFT:
371 return true
372 default:
373 return false
374 }
375}
376
377// isOpcodeAlwaysIllegal returns whether or not the opcode is always illegal
378// when passed over by the program counter even if in a non-executed branch (it

Callers 1

executeOpcodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…