MCPcopy Create free account
hub / github.com/LUX-Core/lux / ExtractDestination

Function ExtractDestination

src/script/standard.cpp:300–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298
299
300bool ExtractDestination(const COutPoint out, const CScript& script, CTxDestination& addressRet, txnouttype* typeRet) {
301 if (!typeRet) {
302 txnouttype type;
303 typeRet = &type;
304 }
305 if (ExtractDestination(script, addressRet, typeRet))
306 return true;
307 if (*typeRet == TX_CREATE) {
308 addressRet = CKeyID(uint160(LuxState::createLuxAddress(uintToh256(out.hash), out.n).asBytes()));
309 // std::cout << CBitcoinAddress(addressRet).ToString()<< " " << out.hash.GetHex() << " " << out.n << std::endl;
310 return true;
311 }
312 return false;
313}
314
315bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet, txnouttype *typeRet)
316{

Callers 15

getreceivedbyaccountFunction · 0.85
ListReceivedFunction · 0.85
printAddressesFunction · 0.85
createcontractFunction · 0.85
sendtocontractFunction · 0.85
SignMethod · 0.85
CreateNewBlockMethod · 0.85
addAddressIndexMethod · 0.85
addSpentIndexMethod · 0.85
GetKeyForDestinationFunction · 0.85
ProcessSubScriptMethod · 0.85
ImportScriptFunction · 0.85

Calls 11

uintToh256Function · 0.85
SolverFunction · 0.85
WitnessV0KeyHashClass · 0.85
WitnessV0ScriptHashClass · 0.85
asBytesMethod · 0.80
CKeyIDClass · 0.70
CScriptIDClass · 0.70
uint256Class · 0.70
uint160Class · 0.50
IsValidMethod · 0.45
GetIDMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68