From d3b09f6bac738958b6bf5711bcb5291049b7466d Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Mon, 19 Oct 2015 14:43:04 -0400 Subject: [PATCH] Do not allow blockfile pruning during reindex. Also clarify startup message. --- src/init.cpp | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index a079dce5b..4460ecb1f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1498,10 +1498,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // if pruning, unset the service bit and perform the initial blockstore prune // after any wallet rescanning has taken place. if (fPruneMode) { - uiInterface.InitMessage(_("Pruning blockstore...")); LogPrintf("Unsetting NODE_NETWORK on prune mode\n"); nLocalServices &= ~NODE_NETWORK; if (!fReindex) { + uiInterface.InitMessage(_("Pruning blockstore...")); PruneAndFlush(); } } diff --git a/src/main.cpp b/src/main.cpp index baad7fc05..95c71b9cc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1881,7 +1881,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { std::set setFilesToPrune; bool fFlushForPrune = false; try { - if (fPruneMode && fCheckForPruning) { + if (fPruneMode && fCheckForPruning && !fReindex) { FindFilesToPrune(setFilesToPrune); fCheckForPruning = false; if (!setFilesToPrune.empty()) {