Skip to content

Commit 02328ae

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#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: bitcoin#11022 (review) Does not affect functionality. Not required for v0.15. Tree-SHA512: d8d0698fd26ea49a4157e68669d5511095760c3a1ecfa3f917e3f273efbafb55c51a202d677614216eae3f796b6e8d17506b2ec2d4799a94f18981b396e65eec
1 parent ac07bf6 commit 02328ae

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4762,15 +4762,11 @@ void CWallet::MarkReserveKeysAsUsed(int64_t keypool_id)
47624762
m_pool_key_to_index.erase(keypool.vchPubKey.GetID());
47634763
}
47644764
walletdb.ErasePool(index);
4765+
LogPrintf("keypool index %d removed\n", index);
47654766
it = setKeyPool->erase(it);
47664767
}
47674768
}
47684769

4769-
bool CWallet::HasUnusedKeys(int min_keys) const
4770-
{
4771-
return setExternalKeyPool.size() >= min_keys && (setInternalKeyPool.size() >= min_keys || !CanSupportFeature(FEATURE_HD_SPLIT));
4772-
}
4773-
47744770
void CWallet::GetScriptForMining(std::shared_ptr<CReserveScript> &script)
47754771
{
47764772
std::shared_ptr<CReserveKey> rKey = std::make_shared<CReserveKey>(this);

src/wallet/wallet.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,6 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
10891089
*/
10901090
void MarkReserveKeysAsUsed(int64_t keypool_id);
10911091
const std::map<CKeyID, int64_t>& GetAllReserveKeys() const { return m_pool_key_to_index; }
1092-
/** Does the wallet have at least min_keys in the keypool? */
1093-
bool HasUnusedKeys(int min_keys) const;
10941092

10951093
std::set< std::set<CTxDestination> > GetAddressGroupings();
10961094
std::map<CTxDestination, CAmount> GetAddressBalances();

0 commit comments

Comments
 (0)