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

Function IsToScriptID

src/compressor.cpp:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30static bool IsToScriptID(const CScript& script, CScriptID &hash)
31{
32 if (script.size() == 23 && script[0] == OP_HASH160 && script[1] == 20
33 && script[22] == OP_EQUAL) {
34 memcpy(&hash, &script[2], 20);
35 return true;
36 }
37 return false;
38}
39
40static bool IsToPubKey(const CScript& script, CPubKey &pubkey)
41{

Callers 1

CompressScriptFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected