MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetAllDestinationsForKey

Function GetAllDestinationsForKey

src/outputtype.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key)
65{
66 CKeyID keyid = key.GetID();
67 if (key.IsCompressed()) {
68 CTxDestination segwit = WitnessV0KeyHash(keyid);
69 CTxDestination p2sh = CScriptID(GetScriptForDestination(segwit));
70 return std::vector<CTxDestination>{std::move(keyid), std::move(p2sh), std::move(segwit)};
71 } else {
72 return std::vector<CTxDestination>{std::move(keyid)};
73 }
74}
75
76CTxDestination AddAndGetDestinationForScript(CKeyStore& keystore, const CScript& script, OutputType type)
77{

Callers 3

GetWalletAddressesForKeyFunction · 0.85
importprivkeyFunction · 0.85
importpubkeyFunction · 0.85

Calls 5

WitnessV0KeyHashClass · 0.85
GetScriptForDestinationFunction · 0.85
GetIDMethod · 0.80
CScriptIDClass · 0.70
IsCompressedMethod · 0.45

Tested by

no test coverage detected