MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsOpSuccess

Function IsOpSuccess

src/script/script.cpp:451–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451bool IsOpSuccess(const opcodetype& opcode)
452{
453 // ELEMENTS: Don't mark opcodes (OP_CAT, OP_SUBSTR, OP_LEFT, OP_RIGHT) as OP_SUCCESS
454 return opcode == 80 || opcode == 98 || (opcode >= 137 && opcode <= 138) ||
455 // ELEMENTS: Don't mark OP_INVERT , OP_AND, OP_OR, OP_XOR. OP_LSHIFT, OP_RSHIFT as success
456 (opcode >= 141 && opcode <= 142) || (opcode >= 149 && opcode <= 151) ||
457 // ELEMENTS: Exclude OP_DETERMINISTICRANDOM(192), OP_CHECKSIGFROMSTACK(VERIFY)(192-193), OP_SUBSTRLAZY(195)
458 // ELEMENTS: Tapscript extension from OP_SHA256INITIALIZE(196) till OP_TWEAKVERIFY(228)
459 (opcode >= 187 && opcode <= 191) || (opcode >= 229 && opcode <= 254);
460}

Callers 2

ExecuteWitnessScriptFunction · 0.85
decodescriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected