| 55 | } |
| 56 | |
| 57 | static bool MatchPayToPubkeyHash(const CScript& script, valtype& pubkeyhash) |
| 58 | { |
| 59 | if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160 && script[2] == 20 && script[23] == OP_EQUALVERIFY && script[24] == OP_CHECKSIG) { |
| 60 | pubkeyhash = valtype(script.begin () + 3, script.begin() + 23); |
| 61 | return true; |
| 62 | } |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | /** Test for "small positive integer" script opcodes - OP_1 through OP_16. */ |
| 67 | static constexpr bool IsSmallInteger(opcodetype opcode) |