From 5b4fdbbff527aef8288edb3bf21b478de1061221 Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 18 Aug 2022 16:40:42 -0300 Subject: [PATCH] wallet: remove UNKNOWN type from OUTPUT_TYPES array This array contains the known active output types only. And it's solely used to create/walk-through the active spkms. --- src/outputtype.h | 1 - src/wallet/wallet.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/outputtype.h b/src/outputtype.h index be5fd62b806..c59262591b7 100644 --- a/src/outputtype.h +++ b/src/outputtype.h @@ -27,7 +27,6 @@ static constexpr auto OUTPUT_TYPES = std::array{ OutputType::P2SH_SEGWIT, OutputType::BECH32, OutputType::BECH32M, - OutputType::UNKNOWN, }; std::optional ParseOutputType(const std::string& str); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d5984253266..553adcc3a2c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3433,7 +3433,6 @@ void CWallet::SetupDescriptorScriptPubKeyMans() for (bool internal : {false, true}) { for (OutputType t : OUTPUT_TYPES) { - if (t == OutputType::UNKNOWN) continue; auto spk_manager = std::unique_ptr(new DescriptorScriptPubKeyMan(*this)); if (IsCrypted()) { if (IsLocked()) {