Merge #9576: [wallet] Remove redundant initialization

343ba8f [wallet] Remove redundant initialization (practicalswift)

Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
This commit is contained in:
Wladimir J. van der Laan 2017-03-06 09:32:23 +01:00
commit 56ab672b59
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -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)
{