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

Method IsPayToPubkeyHash

src/script/script.cpp:292–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292bool CScript::IsPayToPubkeyHash() const
293{
294 // Extra-fast test for pay-to-pubkey-hash CScripts:
295 return (this->size() == 25 &&
296 (*this)[0] == OP_DUP &&
297 (*this)[1] == OP_HASH160 &&
298 (*this)[2] == 0x14 &&
299 (*this)[23] == OP_EQUALVERIFY &&
300 (*this)[24] == OP_CHECKSIG);
301}
302bool CScript::IsPayToWitnessPubkeyHash() const
303{
304 return (this->size() == 22 &&

Callers 1

ScriptHasValidPAKProofFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected