| 17 | */ |
| 18 | |
| 19 | static bool IsToKeyID(const CScript& script, CKeyID &hash) |
| 20 | { |
| 21 | if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160 |
| 22 | && script[2] == 20 && script[23] == OP_EQUALVERIFY |
| 23 | && script[24] == OP_CHECKSIG) { |
| 24 | memcpy(&hash, &script[3], 20); |
| 25 | return true; |
| 26 | } |
| 27 | return false; |
| 28 | } |
| 29 | |
| 30 | static bool IsToScriptID(const CScript& script, CScriptID &hash) |
| 31 | { |