diff options
| author | Gavin Andresen <[email protected]> | 2013-10-15 16:31:46 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-15 16:31:46 -0700 |
| commit | 9e70bff67a581e62a77c40ec5dd3900c62fb86ba (patch) | |
| tree | d495796c3608c5e3eba2f0c3734474e8395ff641 /src/init.cpp | |
| parent | Merge pull request #3080 from Diapolo/sendcoins-paymentreq (diff) | |
| parent | Move CBlockLocator to core.h (diff) | |
| download | discoin-9e70bff67a581e62a77c40ec5dd3900c62fb86ba.tar.xz discoin-9e70bff67a581e62a77c40ec5dd3900c62fb86ba.zip | |
Merge pull request #3083 from sipa/chainlocator
CBlockLocator improvements & move to core
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index dcd65198c..fce599225 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -116,7 +116,7 @@ void Shutdown() { LOCK(cs_main); if (pwalletMain) - pwalletMain->SetBestChain(CBlockLocator(chainActive.Tip())); + pwalletMain->SetBestChain(chainActive.GetLocator()); if (pblocktree) pblocktree->Flush(); if (pcoinsTip) @@ -912,7 +912,7 @@ bool AppInit2(boost::thread_group& threadGroup) strErrors << _("Cannot write default address") << "\n"; } - pwalletMain->SetBestChain(CBlockLocator(chainActive.Tip())); + pwalletMain->SetBestChain(chainActive.GetLocator()); } LogPrintf("%s", strErrors.str().c_str()); @@ -928,7 +928,7 @@ bool AppInit2(boost::thread_group& threadGroup) CWalletDB walletdb(strWalletFile); CBlockLocator locator; if (walletdb.ReadBestBlock(locator)) - pindexRescan = locator.GetBlockIndex(); + pindexRescan = chainActive.FindFork(locator); else pindexRescan = chainActive.Genesis(); } @@ -939,7 +939,7 @@ bool AppInit2(boost::thread_group& threadGroup) nStart = GetTimeMillis(); pwalletMain->ScanForWalletTransactions(pindexRescan, true); LogPrintf(" rescan %15"PRI64d"ms\n", GetTimeMillis() - nStart); - pwalletMain->SetBestChain(CBlockLocator(chainActive.Tip())); + pwalletMain->SetBestChain(chainActive.GetLocator()); nWalletDBUpdated++; } |