| 3765 | } |
| 3766 | |
| 3767 | void CWallet::DeactivateScriptPubKeyMan(uint256 id, OutputType type, bool internal) |
| 3768 | { |
| 3769 | auto spk_man = GetScriptPubKeyMan(type, internal); |
| 3770 | if (spk_man != nullptr && spk_man->GetID() == id) { |
| 3771 | WalletLogPrintf("Deactivate spkMan: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal)); |
| 3772 | WalletBatch batch(GetDatabase()); |
| 3773 | if (!batch.EraseActiveScriptPubKeyMan(static_cast<uint8_t>(type), internal)) { |
| 3774 | throw std::runtime_error(std::string(__func__) + ": erasing active ScriptPubKeyMan id failed"); |
| 3775 | } |
| 3776 | |
| 3777 | auto& spk_mans = internal ? m_internal_spk_managers : m_external_spk_managers; |
| 3778 | spk_mans.erase(type); |
| 3779 | } |
| 3780 | |
| 3781 | NotifyCanGetAddressesChanged(); |
| 3782 | } |
| 3783 | |
| 3784 | bool CWallet::IsLegacy() const |
| 3785 | { |
no test coverage detected