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

Function opcodeFromAltStack

txscript/opcode.go:1217–1225  ·  view source on GitHub ↗

opcodeFromAltStack removes the top item from the alternate data stack and pushes it onto the main data stack. Main data stack transformation: [... x1 x2 x3] -> [... x1 x2 x3 y3] Alt data stack transformation: [... y1 y2 y3] -> [... y1 y2]

(op *opcode, data []byte, vm *Engine)

Source from the content-addressed store, hash-verified

1215// Main data stack transformation: [... x1 x2 x3] -> [... x1 x2 x3 y3]
1216// Alt data stack transformation: [... y1 y2 y3] -> [... y1 y2]
1217func opcodeFromAltStack(op *opcode, data []byte, vm *Engine) error {
1218 so, err := vm.astack.PopByteArray()
1219 if err != nil {
1220 return err
1221 }
1222 vm.dstack.PushByteArray(so)
1223
1224 return nil
1225}
1226
1227// opcode2Drop removes the top 2 items from the data stack.
1228//

Callers

nothing calls this directly

Calls 2

PopByteArrayMethod · 0.80
PushByteArrayMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…