Skip to content

Commit d73ae93

Browse files
committed
CWallet::Create move chain init message up into calling code
1 parent 44c430f commit d73ae93

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/wallet/load.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ bool LoadWallets(interfaces::Chain& chain)
105105
if (!database && status == DatabaseStatus::FAILED_NOT_FOUND) {
106106
continue;
107107
}
108+
chain.initMessage(_("Loading wallet...").translated);
108109
std::shared_ptr<CWallet> pwallet = database ? CWallet::Create(chain, name, std::move(database), options.create_flags, error, warnings) : nullptr;
109110
if (!warnings.empty()) chain.initWarning(Join(warnings, Untranslated("\n")));
110111
if (!pwallet) {

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ std::shared_ptr<CWallet> LoadWalletInternal(interfaces::Chain& chain, const std:
213213
return nullptr;
214214
}
215215

216+
chain.initMessage(_("Loading wallet...").translated);
216217
std::shared_ptr<CWallet> wallet = CWallet::Create(chain, name, std::move(database), options.create_flags, error, warnings);
217218
if (!wallet) {
218219
error = Untranslated("Wallet loading failed.") + Untranslated(" ") + error;
@@ -292,6 +293,7 @@ std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const std::strin
292293
}
293294

294295
// Make the wallet
296+
chain.initMessage(_("Loading wallet...").translated);
295297
std::shared_ptr<CWallet> wallet = CWallet::Create(chain, name, std::move(database), wallet_creation_flags, error, warnings);
296298
if (!wallet) {
297299
error = Untranslated("Wallet creation failed.") + Untranslated(" ") + error;
@@ -3887,8 +3889,6 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, const std::st
38873889
{
38883890
const std::string& walletFile = database->Filename();
38893891

3890-
chain.initMessage(_("Loading wallet…").translated);
3891-
38923892
int64_t nStart = GetTimeMillis();
38933893
// TODO: Can't use std::make_shared because we need a custom deleter but
38943894
// should be possible to use std::allocate_shared.

0 commit comments

Comments
 (0)