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

Function IsToKeyID

src/compressor.cpp:19–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 */
18
19static bool IsToKeyID(const CScript& script, CKeyID &hash)
20{
21 if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160
22 && script[2] == 20 && script[23] == OP_EQUALVERIFY
23 && script[24] == OP_CHECKSIG) {
24 memcpy(&hash, &script[3], 20);
25 return true;
26 }
27 return false;
28}
29
30static bool IsToScriptID(const CScript& script, CScriptID &hash)
31{

Callers 1

CompressScriptFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected