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

Method IsPushOnly

src/script/script.cpp:266–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266bool CScript::IsPushOnly(const_iterator pc) const
267{
268 while (pc < end())
269 {
270 opcodetype opcode;
271 if (!GetOp(pc, opcode))
272 return false;
273 // Note that IsPushOnly() *does* consider OP_RESERVED to be a
274 // push-type opcode, however execution of OP_RESERVED fails, so
275 // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
276 // the P2SH special validation code being executed.
277 if (opcode > OP_16)
278 return false;
279 }
280 return true;
281}
282
283bool CScript::IsPushOnly() const
284{

Callers 7

IsStandardTxFunction · 0.80
SolverFunction · 0.80
VerifyScriptFunction · 0.80
CountWitnessSigOpsFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80
key.cppFile · 0.80

Calls 2

endFunction · 0.85
beginFunction · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64