Browse Source

Merge #9576: [wallet] Remove redundant initialization

343ba8f [wallet] Remove redundant initialization (practicalswift)

Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
pull/1/head
Wladimir J. van der Laan 6 years ago
parent
commit
56ab672b59
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 8
      src/wallet/wallet.cpp

8
src/wallet/wallet.cpp

@ -3686,17 +3686,13 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile) @@ -3686,17 +3686,13 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
RegisterValidationInterface(walletInstance);
CBlockIndex *pindexRescan = chainActive.Tip();
if (GetBoolArg("-rescan", false))
pindexRescan = chainActive.Genesis();
else
CBlockIndex *pindexRescan = chainActive.Genesis();
if (!GetBoolArg("-rescan", false))
{
CWalletDB walletdb(walletFile);
CBlockLocator locator;
if (walletdb.ReadBestBlock(locator))
pindexRescan = FindForkInGlobalIndex(chainActive, locator);
else
pindexRescan = chainActive.Genesis();
}
if (chainActive.Tip() && chainActive.Tip() != pindexRescan)
{

Loading…
Cancel
Save