MCPcopy Create free account
hub / github.com/LUX-Core/lux / NewKeyPool

Method NewKeyPool

src/wallet.cpp:3561–3584  ·  view source on GitHub ↗

* Mark old keypool keys as used, * and generate all new keys */

Source from the content-addressed store, hash-verified

3559 * and generate all new keys
3560 */
3561bool CWallet::NewKeyPool()
3562{
3563 {
3564 LOCK(cs_wallet);
3565 CWalletDB walletdb(strWalletFile);
3566 for (int64_t nIndex : setInternalKeyPool) {
3567 walletdb.ErasePool(nIndex);
3568 }
3569 setInternalKeyPool.clear();
3570 for (int64_t nIndex : setExternalKeyPool) {
3571 walletdb.ErasePool(nIndex);
3572 }
3573 setExternalKeyPool.clear();
3574 nKeysLeftSinceAutoBackup = 0;
3575// m_pool_key_to_index.clear();
3576// darkSendClient.fEnableDarkSend = false;
3577
3578 if (!TopUpKeyPool()) {
3579 return false;
3580 }
3581 LogPrintf("CWallet::NewKeyPool rewrote keypool\n");
3582 }
3583 return true;
3584}
3585
3586size_t CWallet::KeypoolCountExternalKeys()
3587{

Callers 1

AppInit2Function · 0.80

Calls 2

ErasePoolMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected