[wallet] Remove redundant initialization
Summary:
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.
Backport core's PR9576
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: #bitcoin_abc, matiu
Reviewed By: #bitcoin_abc, matiu
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1048