From f7f3a96b74bb795d6e184a628adce21c744d234f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 16 Feb 2013 17:58:45 +0100 Subject: Improve block database load error reporting --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 8c115c26f9..3151a806dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2653,6 +2653,18 @@ bool VerifyDB() { return true; } +void UnloadBlockIndex() +{ + mapBlockIndex.clear(); + setBlockIndexValid.clear(); + pindexGenesisBlock = NULL; + nBestHeight = 0; + bnBestChainWork = 0; + bnBestInvalidWork = 0; + hashBestChain = 0; + pindexBest = NULL; +} + bool LoadBlockIndex() { if (fTestNet) -- cgit v1.2.3