MCPcopy Index your code
hub / github.com/bcoin-org/bcoin / isPushOnly

Method isPushOnly

lib/script/script.js:2465–2475  ·  view source on GitHub ↗

* Test the script to see if it contains only push ops. * Push ops are: OP_1NEGATE, OP_0-OP_16 and all PUSHDATAs. * @returns {Boolean}

()

Source from the content-addressed store, hash-verified

2463 */
2464
2465 isPushOnly() {
2466 for (const op of this.code) {
2467 if (op.value === -1)
2468 return false;
2469
2470 if (op.value > opcodes.OP_16)
2471 return false;
2472 }
2473
2474 return true;
2475 }
2476
2477 /**
2478 * Count the sigops in the script.

Callers 4

isScripthashInputMethod · 0.95
verifyMethod · 0.80
checkStandardMethod · 0.80
isPushOnlyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected