opcodeCodeSeparator stores the current script offset as the most recently seen OP_CODESEPARATOR which is used during signature checking. This opcode does not change the contents of the data stack. The non-segwit ScriptVerifyConstScriptCode rejection is enforced in executeOpcode before this handler
(op *opcode, data []byte, vm *Engine)
| 1951 | // executeOpcode before this handler is dispatched, so it is not |
| 1952 | // re-checked here. |
| 1953 | func opcodeCodeSeparator(op *opcode, data []byte, vm *Engine) error { |
| 1954 | vm.lastCodeSep = int(vm.tokenizer.ByteIndex()) |
| 1955 | |
| 1956 | if vm.taprootCtx != nil { |
| 1957 | vm.taprootCtx.codeSepPos = uint32(vm.tokenizer.OpcodePosition()) |
| 1958 | } |
| 1959 | |
| 1960 | return nil |
| 1961 | } |
| 1962 | |
| 1963 | // opcodeCheckSig treats the top 2 items on the stack as a public key and a |
| 1964 | // signature and replaces them with a bool which indicates if the signature was |
nothing calls this directly
no test coverage detected
searching dependent graphs…