mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-12 21:00:36 +02:00
wallet: Move LegacyScriptPubKeyMan::IsMine to LegacyDataSPKM
IsMine is necessary for migration. It should be inlined with migration when the legacy wallet is removed.
This commit is contained in:
parent
7461d0c006
commit
b231f4d556
@ -98,7 +98,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 LegacyScriptPubKeyMan& keystore, const CScript& scriptPubKey, IsMineSigVersion sigversion, bool recurse_scripthash=true)
|
||||
IsMineResult IsMineInner(const LegacyDataSPKM& keystore, const CScript& scriptPubKey, IsMineSigVersion sigversion, bool recurse_scripthash=true)
|
||||
{
|
||||
IsMineResult ret = IsMineResult::NO;
|
||||
|
||||
@ -213,7 +213,7 @@ IsMineResult IsMineInner(const LegacyScriptPubKeyMan& keystore, const CScript& s
|
||||
|
||||
} // namespace
|
||||
|
||||
isminetype LegacyScriptPubKeyMan::IsMine(const CScript& script) const
|
||||
isminetype LegacyDataSPKM::IsMine(const CScript& script) const
|
||||
{
|
||||
switch (IsMineInner(*this, script, IsMineSigVersion::TOP)) {
|
||||
case IsMineResult::INVALID:
|
||||
|
@ -314,6 +314,8 @@ public:
|
||||
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;
|
||||
@ -435,7 +437,6 @@ public:
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user