Limit LegacyScriptPubKeyMan address types

Make sure that LegacyScriptPubKeyMan can only be used for legacy,
p2sh-segwit, and bech32 address types.
This commit is contained in:
Andrew Chow
2021-06-04 16:37:41 -04:00
parent c93e123dc7
commit 177c15d2f7
3 changed files with 17 additions and 1 deletions

View File

@@ -254,6 +254,13 @@ public:
boost::signals2::signal<void ()> NotifyCanGetAddressesChanged;
};
/** OutputTypes supported by the LegacyScriptPubKeyMan */
static const std::unordered_set<OutputType> LEGACY_OUTPUT_TYPES {
OutputType::LEGACY,
OutputType::P2SH_SEGWIT,
OutputType::BECH32,
};
class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProvider
{
private: