mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Use BECH32M for tr() desc, WitV1Taproot, and WitUnknown CTxDests
The tr() descriptor, WitnessV1Taproot CTxDestination, and WitnessUnknown CTxDestination are OutputType::BECH32M so they should report as such.
This commit is contained in:
@@ -646,11 +646,13 @@ static std::optional<OutputType> OutputTypeFromDestination(const CTxDestination&
|
||||
return OutputType::LEGACY;
|
||||
}
|
||||
if (std::holds_alternative<WitnessV0KeyHash>(dest) ||
|
||||
std::holds_alternative<WitnessV0ScriptHash>(dest) ||
|
||||
std::holds_alternative<WitnessV1Taproot>(dest) ||
|
||||
std::holds_alternative<WitnessUnknown>(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;
|
||||
}
|
||||
|
||||
@@ -874,7 +876,7 @@ public:
|
||||
{
|
||||
assert(m_subdescriptor_args.size() == m_depths.size());
|
||||
}
|
||||
std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32; }
|
||||
std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32M; }
|
||||
bool IsSingleType() const final { return true; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user