bitcoin/bitcoin — pull request #3077 by sipa (2013-10-10 21:10:06+00:00)
Title: Refactor/encapsulate chain globals into a CChain class

This removes several globals (pindexBest, hashBestChain, nBestHeight, nBestChainWork, vBlockIndexByHeight), and turns them into an instance of a CChain class, chainBlocks.

This is a preparation for a second iteration of headersfirst which I'm implementing, which will add a second instance (chainHeaders). This pull request shouldn't change any functionality.