| 4655 | } |
| 4656 | |
| 4657 | void 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 | |
| 4668 | void CWallet::LearnAllRelatedScripts(const CPubKey& key) |
| 4669 | { |
no test coverage detected