[wallet] Remove redundant initialization
commit343ba8fef586906fa8e7985e3cdec9ae390b475a
authorpracticalswift <practicalswift@users.noreply.github.com>
Wed, 18 Jan 2017 16:59:10 +0000 (18 17:59 +0100)
committerpracticalswift <practicalswift@users.noreply.github.com>
Tue, 28 Feb 2017 15:54:43 +0000 (28 16:54 +0100)
tree26ef166317e7c2dd360893d359f472a0c0d09e0e
parent7e2a2212ecac41bf4a4fd9f2de6b4cd258938497
[wallet] Remove redundant initialization

Prior to this commit pindexRescan was initialized to a chainActive.Tip().
However, the value of pindexRescan set at time of initialization was never
read before pindexRescan was being set to either chainActive.Genesis()
(case 1), FindForkInGlobalIndex(chainActive, locator) (case 2) or
chainActive.Genesis() (case 3). Thus, the initialization was redundant.

This commit a.) removes the redundant initialization and b.) simplifies
this logic so that pindexRescan is initialized to chainActive.Genesis()
(case 1 and 3), and set to FindForkInGlobalIndex(chainActive, locator)
(case 2) as needed.
src/wallet/wallet.cpp