Skip to content

Commit

Permalink
Revert "wallet: Move LegacyScriptPubKeyMan::IsMine to LegacyDataSPKM"
Browse files Browse the repository at this point in the history
This reverts commit bbb1d51.
  • Loading branch information
achow101 committed Oct 16, 2024
1 parent 8730763 commit 34751ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/wallet/scriptpubkeyman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ bool HaveKeys(const std::vector<valtype>& 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;

Expand Down Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions src/wallet/scriptpubkeyman.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ class LegacyDataSPKM : public ScriptPubKeyMan, public FillableSigningProvider
std::unordered_set<CScript, SaltedSipHasher> GetScriptPubKeys() const override;
std::unique_ptr<SigningProvider> 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;
Expand Down Expand Up @@ -451,6 +449,7 @@ class LegacyScriptPubKeyMan : public LegacyDataSPKM
LegacyScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size) : LegacyDataSPKM(storage), m_keypool_size(keypool_size) {}

util::Result<CTxDestination> GetNewDestination(const OutputType type) override;
isminetype IsMine(const CScript& script) const override;

bool Encrypt(const CKeyingMaterial& master_key, WalletBatch* batch) override;

Expand Down

0 comments on commit 34751ae

Please sign in to comment.