mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge #9576: [wallet] Remove redundant initialization
343ba8f
[wallet] Remove redundant initialization (practicalswift)
Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
This commit is contained in:
commit
56ab672b59
@ -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…
Reference in New Issue
Block a user