MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsPayToScriptHash

Method IsPayToScriptHash

src/script/script.cpp:312–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310//
311
312bool CScript::IsPayToScriptHash() const
313{
314 // Extra-fast test for pay-to-script-hash CScripts:
315 return (this->size() == 23 &&
316 (*this)[0] == OP_HASH160 &&
317 (*this)[1] == 0x14 &&
318 (*this)[22] == OP_EQUAL);
319}
320
321bool CScript::IsPayToWitnessScriptHash() const
322{

Callers 15

CheckPeginTxFunction · 0.80
MutateTxSignFunction · 0.80
IsWitnessStandardFunction · 0.80
listunspentFunction · 0.80
getpeginaddressFunction · 0.80
VerifyScriptFunction · 0.80
CountWitnessSigOpsFunction · 0.80
SolverFunction · 0.80
IsSegWitOutputFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 4

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64