diff options
| author | James O'Beirne <[email protected]> | 2018-04-11 14:14:45 -0400 |
|---|---|---|
| committer | James O'Beirne <[email protected]> | 2018-04-11 15:56:37 -0400 |
| commit | 0ef7b403d0a203ae2251ea0b9b926c7f41d80d1d (patch) | |
| tree | 2a5abed7c426b7090ed60223cc865d889b36850d /src/validation.cpp | |
| parent | Merge #12933: doc: Refine header include policy (diff) | |
| download | discoin-0ef7b403d0a203ae2251ea0b9b926c7f41d80d1d.tar.xz discoin-0ef7b403d0a203ae2251ea0b9b926c7f41d80d1d.zip | |
[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`.
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 8066e6c7a..72fa967c0 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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) { |