| 3491 | } |
| 3492 | |
| 3493 | void CWallet::SetupLegacyScriptPubKeyMan() |
| 3494 | { |
| 3495 | if (!m_internal_spk_managers.empty() || !m_external_spk_managers.empty() || !m_spk_managers.empty() || IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { |
| 3496 | return; |
| 3497 | } |
| 3498 | |
| 3499 | auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new LegacyScriptPubKeyMan(*this)); |
| 3500 | for (const auto& type : LEGACY_OUTPUT_TYPES) { |
| 3501 | m_internal_spk_managers[type] = spk_manager.get(); |
| 3502 | m_external_spk_managers[type] = spk_manager.get(); |
| 3503 | } |
| 3504 | m_spk_managers[spk_manager->GetID()] = std::move(spk_manager); |
| 3505 | } |
| 3506 | |
| 3507 | // |
| 3508 | // ELEMENTS WALLET ADDITIONS |