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

Method LearnRelatedScripts

src/wallet.cpp:4657–4666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4655}
4656
4657void CWallet::LearnRelatedScripts(const CPubKey& key, OutputType type)
4658{
4659 if (key.IsCompressed() && (type == OUTPUT_TYPE_P2SH_SEGWIT || type == OUTPUT_TYPE_BECH32)) {
4660 CTxDestination witdest = WitnessV0KeyHash(key.GetID());
4661 CScript witprog = GetScriptForDestination(witdest);
4662 // Make sure the resulting program is solvable.
4663 assert(IsSolvable(*this, witprog));
4664 AddCScript(witprog);
4665 }
4666}
4667
4668void CWallet::LearnAllRelatedScripts(const CPubKey& key)
4669{

Callers 3

getnewaddressFunction · 0.80
getrawchangeaddressFunction · 0.80
addRowMethod · 0.80

Calls 5

WitnessV0KeyHashClass · 0.85
GetScriptForDestinationFunction · 0.85
IsSolvableFunction · 0.85
IsCompressedMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected