opcodeN is a common handler for the small integer data push opcodes. It pushes the numeric value the opcode represents (which will be from 1 to 16) onto the data stack.
(op *opcode, data []byte, vm *Engine)
| 807 | // pushes the numeric value the opcode represents (which will be from 1 to 16) |
| 808 | // onto the data stack. |
| 809 | func opcodeN(op *opcode, data []byte, vm *Engine) error { |
| 810 | // The opcodes are all defined consecutively, so the numeric value is |
| 811 | // the difference. |
| 812 | vm.dstack.PushInt(scriptNum((op.value - (OP_1 - 1)))) |
| 813 | return nil |
| 814 | } |
| 815 | |
| 816 | // opcodeNop is a common handler for the NOP family of opcodes. As the name |
| 817 | // implies it generally does nothing, however, it will return an error when |