aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2019-05-09 18:10:29 -0400
committerMarcoFalke <[email protected]>2019-05-13 11:53:38 -0400
commitfa86c8aec611a9b9d2f53960c92419cf2a8bb92d (patch)
tree99d40b228ca322a82a860923461fce69b1b3e904 /src/validation.cpp
parentMerge #15664: change default Python block serialization to witness (diff)
downloaddiscoin-fa86c8aec611a9b9d2f53960c92419cf2a8bb92d.tar.xz
discoin-fa86c8aec611a9b9d2f53960c92419cf2a8bb92d.zip
init: Remove dead code in LoadChainTip
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index b71e8daf9..77d1d4bb4 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3951,20 +3951,10 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams) EXCLUSIVE_LOCKS_RE
bool LoadChainTip(const CChainParams& chainparams)
{
AssertLockHeld(cs_main);
+ assert(!pcoinsTip->GetBestBlock().IsNull()); // Never called when the coins view is empty
if (::ChainActive().Tip() && ::ChainActive().Tip()->GetBlockHash() == pcoinsTip->GetBestBlock()) return true;
- if (pcoinsTip->GetBestBlock().IsNull() && mapBlockIndex.size() == 1) {
- // In case we just added the genesis block, connect it now, so
- // that we always have a ::ChainActive().Tip() when we return.
- LogPrintf("%s: Connecting genesis block...\n", __func__);
- CValidationState state;
- if (!ActivateBestChain(state, chainparams)) {
- LogPrintf("%s: failed to activate chain (%s)\n", __func__, FormatStateMessage(state));
- return false;
- }
- }
-
// Load pointer to end of best chain
CBlockIndex* pindex = LookupBlockIndex(pcoinsTip->GetBestBlock());
if (!pindex) {