diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-06-04 17:35:47 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-06-22 21:57:04 -0400 |
commit | 87a0e7a3b7c0ffd545e537bd497cdc3e67d045f6 (patch) | |
tree | 0b7a64337d330fcbeefe685b2808fa573f375e71 /src/script/descriptor.cpp | |
parent | 6dbe4d10728f882986ed0d9ed77bc736f051c662 (diff) |
Disallow bech32m addresses for legacy wallet things
We don't want the legacy wallet to ever have bech32m addresses so don't
allow importing them. This includes addmultisigaddress as that is a
legacy wallet only RPC
Additionally, bech32m multisigs are not available yet, so disallow them
in createmultisig.
Diffstat (limited to 'src/script/descriptor.cpp')
-rw-r--r-- | src/script/descriptor.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 5da249b7f9..d796ed26aa 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -640,22 +640,6 @@ public: std::optional<OutputType> GetOutputType() const override { return std::nullopt; } }; -static std::optional<OutputType> OutputTypeFromDestination(const CTxDestination& dest) { - if (std::holds_alternative<PKHash>(dest) || - std::holds_alternative<ScriptHash>(dest)) { - return OutputType::LEGACY; - } - if (std::holds_alternative<WitnessV0KeyHash>(dest) || - std::holds_alternative<WitnessV0ScriptHash>(dest)) { - return OutputType::BECH32; - } - if (std::holds_alternative<WitnessV1Taproot>(dest) || - std::holds_alternative<WitnessUnknown>(dest)) { - return OutputType::BECH32M; - } - return std::nullopt; -} - /** A parsed addr(A) descriptor. */ class AddressDescriptor final : public DescriptorImpl { |