diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 09:32:23 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 09:40:06 +0100 |
commit | 56ab672b59dae168a0a34c40b5ba3aa5034bbd76 (patch) | |
tree | 1445f24817a71b32c0338554ed8775b74ec17d0e /src | |
parent | 01b7cda9168438dc88805c4ed9ba88184c83ca17 (diff) | |
parent | 343ba8fef586906fa8e7985e3cdec9ae390b475a (diff) |
Merge #9576: [wallet] Remove redundant initialization
343ba8f [wallet] Remove redundant initialization (practicalswift)
Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ce3f1fb549..1cdbaedf81 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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) { |