| 28 | } |
| 29 | |
| 30 | static 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 | |
| 40 | static bool IsToPubKey(const CScript& script, CPubKey &pubkey) |
| 41 | { |