File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -3951,20 +3951,10 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams) EXCLUSIVE_LOCKS_RE
3951
3951
bool LoadChainTip (const CChainParams& chainparams)
3952
3952
{
3953
3953
AssertLockHeld (cs_main);
3954
+ assert (!pcoinsTip->GetBestBlock ().IsNull ()); // Never called when the coins view is empty
3954
3955
3955
3956
if (::ChainActive ().Tip () && ::ChainActive ().Tip ()->GetBlockHash () == pcoinsTip->GetBestBlock ()) return true ;
3956
3957
3957
- if (pcoinsTip->GetBestBlock ().IsNull () && mapBlockIndex.size () == 1 ) {
3958
- // In case we just added the genesis block, connect it now, so
3959
- // that we always have a ::ChainActive().Tip() when we return.
3960
- LogPrintf (" %s: Connecting genesis block...\n " , __func__);
3961
- CValidationState state;
3962
- if (!ActivateBestChain (state, chainparams)) {
3963
- LogPrintf (" %s: failed to activate chain (%s)\n " , __func__, FormatStateMessage (state));
3964
- return false ;
3965
- }
3966
- }
3967
-
3968
3958
// Load pointer to end of best chain
3969
3959
CBlockIndex* pindex = LookupBlockIndex (pcoinsTip->GetBestBlock ());
3970
3960
if (!pindex) {
You can’t perform that action at this time.
0 commit comments