diff options
| author | Andrew Chow <[email protected]> | 2019-10-07 14:11:34 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2019-11-01 22:56:37 -0400 |
| commit | acedc5b8230ed9ad07f96f51f0ef862ab3a41d5e (patch) | |
| tree | d67e318556f2311c80421aadcf71ff00bdf6ffdc /src/wallet/scriptpubkeyman.cpp | |
| parent | Refactor: Declare LegacyScriptPubKeyMan methods as virtual (diff) | |
| download | discoin-acedc5b8230ed9ad07f96f51f0ef862ab3a41d5e.tar.xz discoin-acedc5b8230ed9ad07f96f51f0ef862ab3a41d5e.zip | |
Refactor: Add new ScriptPubKeyMan virtual methods
This commit does not change behavior.
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
| -rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 259bfcd76..41ef12107 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -265,6 +265,31 @@ bool LegacyScriptPubKeyMan::EncryptKeys(CKeyingMaterial& vMasterKeyIn) return true; } +bool LegacyScriptPubKeyMan::GetReservedDestination(const OutputType type, bool internal, int64_t& index, CKeyPool& keypool) +{ + { + if (!ReserveKeyFromKeyPool(index, keypool, internal)) { + return false; + } + } + return true; +} + +void LegacyScriptPubKeyMan::KeepDestination(int64_t index) +{ + KeepKey(index); +} + +void LegacyScriptPubKeyMan::ReturnDestination(int64_t index, bool internal, const CPubKey& pubkey) +{ + ReturnKey(index, internal, pubkey); +} + +bool LegacyScriptPubKeyMan::TopUp(unsigned int size) +{ + return TopUpKeyPool(size); +} + void LegacyScriptPubKeyMan::UpgradeKeyMetadata() { AssertLockHeld(cs_wallet); |