From aebafd0edf81b546d4b7db9e7f53e9eef2c0073e Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 1 Feb 2019 16:17:43 -0500 Subject: Rename Chain getLocator -> getTipLocator Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252044389 --- src/interfaces/chain.cpp | 2 +- src/interfaces/chain.h | 2 +- src/wallet/wallet.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index 38888be8a3..da810bc5e6 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -123,7 +123,7 @@ class LockImpl : public Chain::Lock CBlockIndex* block = LookupBlockIndex(hash); return block && block->GetAncestor(::chainActive.Height()) == ::chainActive.Tip(); } - CBlockLocator getLocator() override { return ::chainActive.GetLocator(); } + CBlockLocator getTipLocator() override { return ::chainActive.GetLocator(); } Optional findLocatorFork(const CBlockLocator& locator) override { LockAnnotation lock(::cs_main); diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 735d5b60df..3a54b9164e 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -96,7 +96,7 @@ public: virtual bool isPotentialTip(const uint256& hash) = 0; //! Get locator for the current chain tip. - virtual CBlockLocator getLocator() = 0; + virtual CBlockLocator getTipLocator() = 0; //! Return height of the latest block common to locator and chain, which //! is guaranteed to be an ancestor of the block used to create the diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 98e6f2f9bf..bdddcd718b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4086,7 +4086,7 @@ std::shared_ptr CWallet::CreateWalletFromFile(interfaces::Chain& chain, } auto locked_chain = chain.assumeLocked(); // Temporary. Removed in upcoming lock cleanup - walletInstance->ChainStateFlushed(locked_chain->getLocator()); + walletInstance->ChainStateFlushed(locked_chain->getTipLocator()); } else if (wallet_creation_flags & WALLET_FLAG_DISABLE_PRIVATE_KEYS) { // Make it impossible to disable private keys after creation InitError(strprintf(_("Error loading %s: Private keys can only be disabled during creation"), walletFile)); @@ -4233,7 +4233,7 @@ std::shared_ptr CWallet::CreateWalletFromFile(interfaces::Chain& chain, } } walletInstance->WalletLogPrintf("Rescan completed in %15dms\n", GetTimeMillis() - nStart); - walletInstance->ChainStateFlushed(locked_chain->getLocator()); + walletInstance->ChainStateFlushed(locked_chain->getTipLocator()); walletInstance->database->IncrementUpdateCounter(); // Restore wallet transaction metadata after -zapwallettxes=1 -- cgit v1.2.3