Qt: load wallet in UI after possible init aborts

This commit is contained in:
Jonas Schnelli 2018-06-19 21:33:13 +02:00
parent 3f398d7a17
commit 3a03d2a33f
No known key found for this signature in database
GPG key ID: 1EB776BB03C7922D

View file

@ -4095,8 +4095,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
}
}
uiInterface.LoadWallet(walletInstance);
int prev_version = walletInstance->nWalletVersion;
if (gArgs.GetBoolArg("-upgradewallet", fFirstRun))
{
@ -4346,6 +4344,8 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
}
}
uiInterface.LoadWallet(walletInstance);
// Register with the validation interface. It's ok to do this after rescan since we're still holding cs_main.
RegisterValidationInterface(walletInstance.get());