From 7fdbb19edbdd9e09a40d7726b859484c111a697e Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 14 Nov 2024 16:16:10 -0500 Subject: [PATCH] Revert "wallet: Move LegacyScriptPubKeyMan::IsMine to LegacyDataSPKM" This reverts commit b231f4d556876ae70305e8710e31d53525ded8ae. --- src/wallet/scriptpubkeyman.cpp | 4 ++-- src/wallet/scriptpubkeyman.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 3b2c965fff7803..77777ad326ee65 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -102,7 +102,7 @@ bool HaveKeys(const std::vector& pubkeys, const LegacyDataSPKM& keystor //! scripts or simply treat any script that has been //! stored in the keystore as spendable // NOLINTNEXTLINE(misc-no-recursion) -IsMineResult IsMineInner(const LegacyDataSPKM& keystore, const CScript& scriptPubKey, IsMineSigVersion sigversion, bool recurse_scripthash=true) +IsMineResult IsMineInner(const LegacyScriptPubKeyMan& keystore, const CScript& scriptPubKey, IsMineSigVersion sigversion, bool recurse_scripthash=true) { IsMineResult ret = IsMineResult::NO; @@ -218,7 +218,7 @@ IsMineResult IsMineInner(const LegacyDataSPKM& keystore, const CScript& scriptPu } // namespace -isminetype LegacyDataSPKM::IsMine(const CScript& script) const +isminetype LegacyScriptPubKeyMan::IsMine(const CScript& script) const { switch (IsMineInner(*this, script, IsMineSigVersion::TOP)) { case IsMineResult::INVALID: diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index cf7b7eaf31de7c..c9ebd5a3f76cf4 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -316,8 +316,6 @@ class LegacyDataSPKM : public ScriptPubKeyMan, public FillableSigningProvider std::unordered_set GetScriptPubKeys() const override; std::unique_ptr GetSolvingProvider(const CScript& script) const override; uint256 GetID() const override { return uint256::ONE; } - // TODO: Remove IsMine when deleting LegacyScriptPubKeyMan - isminetype IsMine(const CScript& script) const override; // FillableSigningProvider overrides bool HaveKey(const CKeyID &address) const override; @@ -451,6 +449,7 @@ class LegacyScriptPubKeyMan : public LegacyDataSPKM LegacyScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size) : LegacyDataSPKM(storage), m_keypool_size(keypool_size) {} util::Result GetNewDestination(const OutputType type) override; + isminetype IsMine(const CScript& script) const override; bool Encrypt(const CKeyingMaterial& master_key, WalletBatch* batch) override;