| 91 | } |
| 92 | |
| 93 | static bool MatchPayToPubkeyHash(const CScript& script, valtype& pubkeyhash) |
| 94 | { |
| 95 | if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160 && script[2] == 20 && script[23] == OP_EQUALVERIFY && script[24] == OP_CHECKSIG) { |
| 96 | pubkeyhash = valtype(script.begin () + 3, script.begin() + 23); |
| 97 | return true; |
| 98 | } |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | /** Test for "small positive integer" script opcodes - OP_1 through OP_16. */ |
| 103 | static constexpr bool IsSmallInteger(opcodetype opcode) |