From 4fea06db25108e7f72710bf22c3d1896707eeb74 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 10 Aug 2012 15:13:57 +0200 Subject: Automatically reorganize at startup to best known block Given that the block tree database (chain.dat) and the active chain database (coins.dat) are entirely separate now, it becomes legal to swap one with another instance without affecting the other. This commit introduces a check in the startup code that detects the presence of a better chain in chain.dat that has not been activated yet, and does so efficiently (in batch, while reusing the blk???.dat files). --- src/db.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/db.cpp') diff --git a/src/db.cpp b/src/db.cpp index 06e5543b2..5ca9ea2c3 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -636,7 +636,6 @@ bool LoadBlockIndex(CChainDB &chaindb) { if (pindexGenesisBlock == NULL) return true; - return error("CTxDB::LoadBlockIndex() : hashBestChain not loaded"); } hashBestChain = pindexBest->GetBlockHash(); nBestHeight = pindexBest->nHeight; -- cgit v1.2.3