MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / IsSmallInteger

Function IsSmallInteger

src/script/solver.cpp:59–62  ·  view source on GitHub ↗

Test for "small positive integer" script opcodes - OP_1 through OP_16. */

Source from the content-addressed store, hash-verified

57
58/** Test for "small positive integer" script opcodes - OP_1 through OP_16. */
59static constexpr bool IsSmallInteger(opcodetype opcode)
60{
61 return opcode >= OP_1 && opcode <= OP_16;
62}
63
64/** Retrieve a minimally-encoded number in range [min,max] from an (opcode, data) pair,
65 * whether it's OP_n or through a push. */

Callers 1

GetScriptNumberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected