| 223 | |
| 224 | namespace { |
| 225 | class CScriptVisitor { |
| 226 | public: |
| 227 | CScript operator()(const CNoDestination &dest) const { return CScript(); } |
| 228 | |
| 229 | CScript operator()(const PKHash &keyID) const { |
| 230 | return CScript() << OP_DUP << OP_HASH160 << ToByteVector(keyID) |
| 231 | << OP_EQUALVERIFY << OP_CHECKSIG; |
| 232 | } |
| 233 | |
| 234 | CScript operator()(const ScriptHash &scriptID) const { |
| 235 | return CScript() << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL; |
| 236 | } |
| 237 | }; |
| 238 | } // namespace |
| 239 | |
| 240 | CScript GetScriptForDestination(const CTxDestination &dest) { |
no outgoing calls
no test coverage detected