MCPcopy Create free account
hub / github.com/btcsuite/btcd / OpcodePosition

Method OpcodePosition

txscript/tokenizer.go:168–170  ·  view source on GitHub ↗

OpcodePosition returns the current op code counter. Unlike the ByteIndex above (referred to as the program counter or pc at times), this is incremented with each node op code, and isn't incremented more than once for push datas. NOTE: If no op codes have been parsed, this returns -1.

()

Source from the content-addressed store, hash-verified

166//
167// NOTE: If no op codes have been parsed, this returns -1.
168func (t *ScriptTokenizer) OpcodePosition() int32 {
169 return t.opcodePos
170}
171
172// Opcode returns the current opcode associated with the tokenizer.
173func (t *ScriptTokenizer) Opcode() byte {

Callers 1

opcodeCodeSeparatorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected