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
This commit is contained in:
parent
ac07bf609e
commit
02328ae966
@ -4762,15 +4762,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);
|
||||
|
@ -1089,8 +1089,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();
|
||||
|
Loading…
Reference in New Issue
Block a user