refactor: Wallet stats logging in its own function

This will avoid repetition when wallet creation and loading are
separated.
This commit is contained in:
David Gumberg
2025-05-27 16:46:00 -07:00
parent a9d64cd49c
commit bc69070416
2 changed files with 9 additions and 6 deletions

View File

@@ -3093,12 +3093,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
return nullptr;
}
{
LOCK(walletInstance->cs_wallet);
walletInstance->WalletLogPrintf("setKeyPool.size() = %u\n", walletInstance->GetKeyPoolSize());
walletInstance->WalletLogPrintf("mapWallet.size() = %u\n", walletInstance->mapWallet.size());
walletInstance->WalletLogPrintf("m_address_book.size() = %u\n", walletInstance->m_address_book.size());
}
WITH_LOCK(walletInstance->cs_wallet, walletInstance->LogStats());
return walletInstance;
}