MCPcopy
hub / github.com/bcoin-org/bcoin / fromSmall

Method fromSmall

lib/script/opcode.js:495–498  ·  view source on GitHub ↗

* Instantiate an opcode from a small number. * @param {Number} num * @returns {Opcode}

(num)

Source from the content-addressed store, hash-verified

493 */
494
495 static fromSmall(num) {
496 assert((num & 0xff) === num && num >= 0 && num <= 16);
497 return this.fromOp(num === 0 ? 0 : num + 0x50);
498 }
499
500 /**
501 * Instantiate an opcode from a ScriptNum.

Callers 8

fromBoolMethod · 0.95
fromProgramMethod · 0.80
setSmallMethod · 0.80
pushSmallMethod · 0.80
unshiftSmallMethod · 0.80
insertSmallMethod · 0.80
mempool-test.jsFile · 0.80
indexer-test.jsFile · 0.80

Calls 1

fromOpMethod · 0.95

Tested by

no test coverage detected