MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / MatchPayToPubkeyHash

Function MatchPayToPubkeyHash

src/script/solver.cpp:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static bool MatchPayToPubkeyHash(const CScript& script, valtype& pubkeyhash)
50{
51 if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160 && script[2] == 20 && script[23] == OP_EQUALVERIFY && script[24] == OP_CHECKSIG) {
52 pubkeyhash = valtype(script.begin () + 3, script.begin() + 23);
53 return true;
54 }
55 return false;
56}
57
58/** Test for "small positive integer" script opcodes - OP_1 through OP_16. */
59static constexpr bool IsSmallInteger(opcodetype opcode)

Callers 1

SolverFunction · 0.85

Calls 2

sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected