opcodeDepth pushes the depth of the data stack prior to executing this opcode, encoded as a number, onto the data stack. Stack transformation: [...] -> [... ] Example with 2 items: [x1 x2] -> [x1 x2 2] Example with 3 items: [x1 x2 x3] -> [x1 x2 x3 3]
(op *opcode, data []byte, vm *Engine)
| 1292 | // Example with 2 items: [x1 x2] -> [x1 x2 2] |
| 1293 | // Example with 3 items: [x1 x2 x3] -> [x1 x2 x3 3] |
| 1294 | func opcodeDepth(op *opcode, data []byte, vm *Engine) error { |
| 1295 | vm.dstack.PushInt(scriptNum(vm.dstack.Depth())) |
| 1296 | return nil |
| 1297 | } |
| 1298 | |
| 1299 | // opcodeDrop removes the top item from the data stack. |
| 1300 | // |