diff --git a/src/validation.cpp b/src/validation.cpp index 91531b4bef..73d39f8193 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -283,7 +283,8 @@ namespace { CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) { - // Find the first block the caller has in the main chain + // Find the latest block common to locator and chain - we expect that + // locator.vHave is sorted descending by height. for (const uint256& hash : locator.vHave) { BlockMap::iterator mi = mapBlockIndex.find(hash); if (mi != mapBlockIndex.end())