| 1457 | } |
| 1458 | |
| 1459 | void LegacyScriptPubKeyMan::LearnRelatedScripts(const CPubKey& key, OutputType type) |
| 1460 | { |
| 1461 | assert(type != OutputType::BECH32M); |
| 1462 | if (key.IsCompressed() && (type == OutputType::P2SH_SEGWIT || type == OutputType::BECH32)) { |
| 1463 | CTxDestination witdest = WitnessV0KeyHash(key.GetID()); |
| 1464 | CScript witprog = GetScriptForDestination(witdest); |
| 1465 | // Make sure the resulting program is solvable. |
| 1466 | assert(IsSolvable(*this, witprog)); |
| 1467 | AddCScript(witprog); |
| 1468 | } |
| 1469 | } |
| 1470 | |
| 1471 | void LegacyScriptPubKeyMan::LearnAllRelatedScripts(const CPubKey& key) |
| 1472 | { |
nothing calls this directly
no test coverage detected