[doc] Fix comment in FindForkInGlobalIndex

The comment erroneously implies that we're searching `chainActive` for the
first block common to `locator`, but we're using the parameter `chain`.
This commit is contained in:
James O'Beirne 2018-04-11 14:14:45 -04:00
parent 3cf76c23fb
commit 0ef7b403d0

View file

@ -263,7 +263,8 @@ CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& loc
{
AssertLockHeld(cs_main);
// 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) {
CBlockIndex* pindex = LookupBlockIndex(hash);
if (pindex) {