diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-08-19 11:47:41 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-08-19 12:01:23 -0400 |
commit | 0f0508bc72902d1665d73857b5bcffccdaa44958 (patch) | |
tree | 47b5eab6fa35cb4cddd708ea3a3061200a8da851 /src | |
parent | 9eaef10801051385c074fca13afe1297e8494ea5 (diff) | |
parent | 5b4fdbbff527aef8288edb3bf21b478de1061221 (diff) |
Merge bitcoin/bitcoin#25869: wallet: remove UNKNOWN type from OUTPUT_TYPES array
5b4fdbbff527aef8288edb3bf21b478de1061221 wallet: remove UNKNOWN type from OUTPUT_TYPES array (furszy)
Pull request description:
Fixing https://github.com/bitcoin/bitcoin/pull/25734#discussion_r949502998 -> https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50329
The `OUTPUT_TYPES` array contain the known active output types only.
And it's solely used to create/walk-through the active spkms.
So, no need to add the `UNKNOWN` type here.
ACKs for top commit:
achow101:
ACK 5b4fdbbff527aef8288edb3bf21b478de1061221
w0xlt:
ACK https://github.com/bitcoin/bitcoin/pull/25869/commits/5b4fdbbff527aef8288edb3bf21b478de1061221
LarryRuane:
ACK 5b4fdbbff527aef8288edb3bf21b478de1061221
Tree-SHA512: dee2dc362a1b0c777555e5ee4d355a3351340591d0096f74e8c3a25f374cb2d9aef26145977ff4dd0f8cc940da9464eb5541eb2895bc19f8cbd6bb6d292ab9a9
Diffstat (limited to 'src')
-rw-r--r-- | src/outputtype.h | 1 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/src/outputtype.h b/src/outputtype.h index be5fd62b80..c59262591b 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<OutputType> ParseOutputType(const std::string& str); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 752aad2378..de787ae421 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3446,7 +3446,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<DescriptorScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this)); if (IsCrypted()) { if (IsLocked()) { |