From 5b932d7f193e8c4acf84c91aebc383f8e44def30 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 13 Dec 2024 14:41:00 -0500 Subject: [PATCH] legacy spkm: Move CanProvide to LegacyDataSPKM This function will be needed in migration --- src/wallet/scriptpubkeyman.cpp | 2 +- src/wallet/scriptpubkeyman.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 23e2257b1e7..115b4b0b67e 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -591,7 +591,7 @@ std::unique_ptr LegacyDataSPKM::GetSolvingProvider(const CScrip return std::make_unique(*this); } -bool LegacyScriptPubKeyMan::CanProvide(const CScript& script, SignatureData& sigdata) +bool LegacyDataSPKM::CanProvide(const CScript& script, SignatureData& sigdata) { IsMineResult ismine = IsMineInner(*this, script, IsMineSigVersion::TOP, /* recurse_scripthash= */ false); if (ismine == IsMineResult::SPENDABLE || ismine == IsMineResult::WATCH_ONLY) { diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index d8b6c90178a..c5e45e4fa8f 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -318,6 +318,7 @@ public: uint256 GetID() const override { return uint256::ONE; } // TODO: Remove IsMine when deleting LegacyScriptPubKeyMan isminetype IsMine(const CScript& script) const override; + bool CanProvide(const CScript& script, SignatureData& sigdata) override; // FillableSigningProvider overrides bool HaveKey(const CKeyID &address) const override; @@ -486,8 +487,6 @@ public: bool CanGetAddresses(bool internal = false) const override; - bool CanProvide(const CScript& script, SignatureData& sigdata) override; - bool SignTransaction(CMutableTransaction& tx, const std::map& coins, int sighash, std::map& input_errors) const override; SigningResult SignMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) const override; std::optional FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, int sighash_type = SIGHASH_DEFAULT, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr, bool finalize = true) const override;