diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-07-13 14:32:24 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-08-25 16:25:53 -0400 |
commit | 35f428fae68ad974abdce0fa905148f620a9443c (patch) | |
tree | 756eea785c5ba484d4a1ba1f26f9910e540616b6 /src/wallet/scriptpubkeyman.h | |
parent | ea1ab390e4dac128e3a37d4884528c3f4128ed83 (diff) | |
download | bitcoin-35f428fae68ad974abdce0fa905148f620a9443c.tar.xz |
Implement LegacyScriptPubKeyMan::MigrateToDescriptor
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 8de6fd2b7d..19ec277c56 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -265,6 +265,8 @@ static const std::unordered_set<OutputType> LEGACY_OUTPUT_TYPES { OutputType::BECH32, }; +class DescriptorScriptPubKeyMan; + class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProvider { private: @@ -511,6 +513,10 @@ public: std::set<CKeyID> GetKeys() const override; const std::unordered_set<CScript, SaltedSipHasher> GetScriptPubKeys() const override; + + /** Get the DescriptorScriptPubKeyMans (with private keys) that have the same scriptPubKeys as this LegacyScriptPubKeyMan. + * Does not modify this ScriptPubKeyMan. */ + std::optional<MigrationData> MigrateToDescriptor(); }; /** Wraps a LegacyScriptPubKeyMan so that it can be returned in a new unique_ptr. Does not provide privkeys */ |