wallet: Delete unnecessary PopulateWalletFromDB() calls

This commit is contained in:
David Gumberg 2026-01-15 17:50:05 -08:00
parent f0a046094e
commit 0972785fd7
3 changed files with 0 additions and 9 deletions

View File

@ -77,7 +77,6 @@ void TestAddAddressesToSendBook(interfaces::Node& node)
test.m_node.wallet_loader = wallet_loader.get();
node.setContext(&test.m_node);
const std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockableWalletDatabase());
wallet->PopulateWalletFromDB();
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
{
LOCK(wallet->cs_wallet);

View File

@ -192,7 +192,6 @@ void SyncUpWallet(const std::shared_ptr<CWallet>& wallet, interfaces::Node& node
std::shared_ptr<CWallet> SetupDescriptorsWallet(interfaces::Node& node, TestChain100Setup& test, bool watch_only = false)
{
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockableWalletDatabase());
wallet->PopulateWalletFromDB();
LOCK(wallet->cs_wallet);
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
if (watch_only) {

View File

@ -198,13 +198,6 @@ bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::
bool ret = true;
std::shared_ptr<CWallet> wallet(new CWallet(/*chain=*/nullptr, name, std::move(database)), WalletToolReleaseWallet);
{
LOCK(wallet->cs_wallet);
DBErrors load_wallet_ret = wallet->PopulateWalletFromDB();
if (load_wallet_ret != DBErrors::LOAD_OK) {
error = strprintf(_("Error creating %s"), name);
return false;
}
// Get the database handle
WalletDatabase& db = wallet->GetDatabase();
std::unique_ptr<DatabaseBatch> batch = db.MakeBatch();