MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / IsToScriptID

Function IsToScriptID

src/compressor.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

CompressScriptFunction · 0.85

Calls 2

memcpyFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected