MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetAllDestinationsForKey

Function GetAllDestinationsForKey

src/outputtype.cpp:70–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key)
71{
72 PKHash keyid(key);
73 CTxDestination p2pkh{keyid};
74 if (key.IsCompressed()) {
75 CTxDestination segwit = WitnessV0KeyHash(keyid);
76 CTxDestination p2sh = ScriptHash(GetScriptForDestination(segwit));
77 return Vector(std::move(p2pkh), std::move(p2sh), std::move(segwit));
78 } else {
79 return Vector(std::move(p2pkh));
80 }
81}
82
83CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore, const CScript& script, OutputType type)
84{

Callers 4

backup.cppFile · 0.85
importprivkeyFunction · 0.85
importpubkeyFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 5

WitnessV0KeyHashClass · 0.85
ScriptHashClass · 0.85
GetScriptForDestinationFunction · 0.85
VectorFunction · 0.85
IsCompressedMethod · 0.45

Tested by 1

FUZZ_TARGET_INITFunction · 0.68