diff options
| author | Pieter Wuille <[email protected]> | 2014-08-03 20:05:35 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-08-03 20:12:30 +0200 |
| commit | 1d2a1d4bbc7fa7a323f08e5385d02a08aa6073cf (patch) | |
| tree | 7d1af753944e5813f0ef541efb0a28edf5a283e2 /src/main.cpp | |
| parent | Merge pull request #4602 (diff) | |
| parent | Implement "getchaintips" RPC command to monitor blockchain forks. (diff) | |
| download | discoin-1d2a1d4bbc7fa7a323f08e5385d02a08aa6073cf.tar.xz discoin-1d2a1d4bbc7fa7a323f08e5385d02a08aa6073cf.zip | |
Merge pull request #4536
b33bd7a Implement "getchaintips" RPC command to monitor blockchain forks. (Daniel Kraft)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 353cde0bd..cf9318fed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -444,7 +444,7 @@ CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const { return Genesis(); } -CBlockIndex *CChain::FindFork(CBlockIndex *pindex) const { +const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const { if (pindex->nHeight > Height()) pindex = pindex->GetAncestor(Height()); while (pindex && !Contains(pindex)) @@ -2067,8 +2067,8 @@ static CBlockIndex* FindMostWorkChain() { static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork) { AssertLockHeld(cs_main); bool fInvalidFound = false; - CBlockIndex *pindexOldTip = chainActive.Tip(); - CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork); + const CBlockIndex *pindexOldTip = chainActive.Tip(); + const CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork); // Disconnect active blocks which are no longer in the best chain. while (chainActive.Tip() && chainActive.Tip() != pindexFork) { |