aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-18 17:24:23 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-18 17:27:17 +0200
commit0e5b7486cb7f5fb4ffd50d210bac43c3f84c9dd2 (patch)
tree68786b4ba67436b1a1aabe9b3f8d43e0bcfbef5c /src
parentfc51565cbd4c6caf9c3f8b65fb65b4c0d6297550 (diff)
parent67ceff4039ae038ae16f06128f868a2e8395b59a (diff)
downloadbitcoin-0e5b7486cb7f5fb4ffd50d210bac43c3f84c9dd2.tar.xz
Merge #11044: [wallet] Keypool topup cleanups
67ceff4 [wallet] Add logging to MarkReserveKeysAsUsed (John Newbery) 1221f60 [wallet] Remove keypool_topup_cleanups (John Newbery) Pull request description: A couple of minor cleanups suggested by @ryanofsky here: https://github.com/bitcoin/bitcoin/pull/11022#pullrequestreview-55598940 Does not affect functionality. Not required for v0.15. Tree-SHA512: d8d0698fd26ea49a4157e68669d5511095760c3a1ecfa3f917e3f273efbafb55c51a202d677614216eae3f796b6e8d17506b2ec2d4799a94f18981b396e65eec
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp6
-rw-r--r--src/wallet/wallet.h2
2 files changed, 1 insertions, 7 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index bc0e24d74b..10c834cb33 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3668,15 +3668,11 @@ void CWallet::MarkReserveKeysAsUsed(int64_t keypool_id)
m_pool_key_to_index.erase(keypool.vchPubKey.GetID());
}
walletdb.ErasePool(index);
+ LogPrintf("keypool index %d removed\n", index);
it = setKeyPool->erase(it);
}
}
-bool CWallet::HasUnusedKeys(int min_keys) const
-{
- return setExternalKeyPool.size() >= min_keys && (setInternalKeyPool.size() >= min_keys || !CanSupportFeature(FEATURE_HD_SPLIT));
-}
-
void CWallet::GetScriptForMining(std::shared_ptr<CReserveScript> &script)
{
std::shared_ptr<CReserveKey> rKey = std::make_shared<CReserveKey>(this);
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 19e1638d35..48a25666f7 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -984,8 +984,6 @@ public:
*/
void MarkReserveKeysAsUsed(int64_t keypool_id);
const std::map<CKeyID, int64_t>& GetAllReserveKeys() const { return m_pool_key_to_index; }
- /** Does the wallet have at least min_keys in the keypool? */
- bool HasUnusedKeys(int min_keys) const;
std::set< std::set<CTxDestination> > GetAddressGroupings();
std::map<CTxDestination, CAmount> GetAddressBalances();