Dont create pcoinsTip until after ReplayBlocks.
commitd6af06d68aae985436cbc942f0d11078041d121b
authorMatt Corallo <git@bluematt.me>
Mon, 17 Apr 2017 15:41:10 +0000 (17 11:41 -0400)
committerPieter Wuille <pieter.wuille@gmail.com>
Mon, 26 Jun 2017 17:46:51 +0000 (26 10:46 -0700)
treea8af3452e747b038bc50957aae8b47a9e8585ee5
parenteaca1b7b08b4911292d49efbce8471cbc9ca0e1c
Dont create pcoinsTip until after ReplayBlocks.

This requires that we not access pcoinsTip in InitBlockIndex's
FlushStateToDisk (so we just skip it until later in AppInitMain)
and the LoadChainTip in LoadBlockIndex (which there is already one
later in AppinitMain, after ReplayBlocks, so skipping it there is
fine).

Includes some simplifications by Suhas Daftuar and Pieter Wuille.
src/init.cpp
src/txdb.cpp
src/validation.cpp