interfaces, chain, refactor: Remove inaccurate getActiveChainLocator

The getActiveChainLocator method name was misleading, and its functionality
duplicated `Chain::findBlock`. This commit removes the method and replaces
all its usages with direct `Chain::findBlock` calls.

Additionally, the comment of getActiveChainLocator has been outdated since
commit ed47094 from #25717.

Finally, in CWallet::ScanForWalletTransactions, the findBlock calls are now
unified into a single call at the start of the function.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Co-authored-by: Matias Furszyfer <mfurszy@protonmail.com>
This commit is contained in:
pablomartin4btc
2025-08-10 15:24:49 -03:00
parent 110a0f405c
commit 2b00030af8
3 changed files with 10 additions and 20 deletions

View File

@@ -143,10 +143,6 @@ public:
//! pruned), and contains transactions.
virtual bool haveBlockOnDisk(int height) = 0;
//! Return a locator that refers to a block in the active chain.
//! If specified block is not in the active chain, return locator for the latest ancestor that is in the chain.
virtual CBlockLocator getActiveChainLocator(const uint256& block_hash) = 0;
//! Return height of the highest block on chain in common with the locator,
//! which will either be the original block used to create the locator,
//! or one of its ancestors.