aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-10-07 14:11:34 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-11-01 22:56:37 -0400
commitacedc5b8230ed9ad07f96f51f0ef862ab3a41d5e (patch)
treed67e318556f2311c80421aadcf71ff00bdf6ffdc /src/wallet/scriptpubkeyman.h
parent533d8b364f4e589aa1acb28cdea5e6e6e80d34dc (diff)
downloadbitcoin-acedc5b8230ed9ad07f96f51f0ef862ab3a41d5e.tar.xz
Refactor: Add new ScriptPubKeyMan virtual methods
This commit does not change behavior.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r--src/wallet/scriptpubkeyman.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
index cef153d2bd..ac29fdc5ee 100644
--- a/src/wallet/scriptpubkeyman.h
+++ b/src/wallet/scriptpubkeyman.h
@@ -148,8 +148,11 @@ public:
virtual ~ScriptPubKeyMan() {};
virtual isminetype IsMine(const CScript& script) const { return ISMINE_NO; }
- //! Upgrade stored CKeyMetadata objects to store key origin info as KeyOriginInfo
- virtual void UpgradeKeyMetadata() {}
+ virtual bool GetReservedDestination(const OutputType type, bool internal, int64_t& index, CKeyPool& keypool) { return false; }
+ virtual void KeepDestination(int64_t index) {}
+ virtual void ReturnDestination(int64_t index, bool internal, const CPubKey& pubkey) {}
+
+ virtual bool TopUp(unsigned int size = 0) { return false; }
/* Returns true if HD is enabled */
virtual bool IsHDEnabled() const { return false; }
@@ -247,7 +250,15 @@ public:
//! will encrypt previously unencrypted keys
bool EncryptKeys(CKeyingMaterial& vMasterKeyIn);
- void UpgradeKeyMetadata() override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+
+ bool GetReservedDestination(const OutputType type, bool internal, int64_t& index, CKeyPool& keypool) override;
+ void KeepDestination(int64_t index) override;
+ void ReturnDestination(int64_t index, bool internal, const CPubKey& pubkey) override;
+
+ bool TopUp(unsigned int size = 0) override;
+
+ //! Upgrade stored CKeyMetadata objects to store key origin info as KeyOriginInfo
+ void UpgradeKeyMetadata() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
bool IsHDEnabled() const override;