MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / CScriptVisitor

Class CScriptVisitor

src/script/standard.cpp:275–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273namespace
274{
275class CScriptVisitor : public boost::static_visitor<bool>
276{
277private:
278 CScript *script;
279public:
280 CScriptVisitor(CScript *scriptin) { script = scriptin; }
281
282 bool operator()(const CNoDestination &dest) const {
283 script->clear();
284 return false;
285 }
286
287 bool operator()(const CKeyID &keyID) const {
288 script->clear();
289 *script << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
290 return true;
291 }
292
293 bool operator()(const CScriptID &scriptID) const {
294 script->clear();
295 *script << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
296 return true;
297 }
298};
299}
300
301CScript GetScriptForDestination(const CTxDestination& dest)

Callers 1

GetScriptForDestinationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected