mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
Merge bitcoin/bitcoin#25869: wallet: remove UNKNOWN type from OUTPUT_TYPES array
5b4fdbbff5
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: ACK5b4fdbbff5
w0xlt: ACK5b4fdbbff5
LarryRuane: ACK5b4fdbbff5
Tree-SHA512: dee2dc362a1b0c777555e5ee4d355a3351340591d0096f74e8c3a25f374cb2d9aef26145977ff4dd0f8cc940da9464eb5541eb2895bc19f8cbd6bb6d292ab9a9
This commit is contained in:
@ -27,7 +27,6 @@ static constexpr auto OUTPUT_TYPES = std::array{
|
|||||||
OutputType::P2SH_SEGWIT,
|
OutputType::P2SH_SEGWIT,
|
||||||
OutputType::BECH32,
|
OutputType::BECH32,
|
||||||
OutputType::BECH32M,
|
OutputType::BECH32M,
|
||||||
OutputType::UNKNOWN,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::optional<OutputType> ParseOutputType(const std::string& str);
|
std::optional<OutputType> ParseOutputType(const std::string& str);
|
||||||
|
@ -3446,7 +3446,6 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
|
|||||||
|
|
||||||
for (bool internal : {false, true}) {
|
for (bool internal : {false, true}) {
|
||||||
for (OutputType t : OUTPUT_TYPES) {
|
for (OutputType t : OUTPUT_TYPES) {
|
||||||
if (t == OutputType::UNKNOWN) continue;
|
|
||||||
auto spk_manager = std::unique_ptr<DescriptorScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this));
|
auto spk_manager = std::unique_ptr<DescriptorScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this));
|
||||||
if (IsCrypted()) {
|
if (IsCrypted()) {
|
||||||
if (IsLocked()) {
|
if (IsLocked()) {
|
||||||
|
Reference in New Issue
Block a user