Skip to content

Commit d3b09f6

Browse files
committed
Do not allow blockfile pruning during reindex.
Also clarify startup message.
1 parent da7d57f commit d3b09f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,10 +1498,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
14981498
// if pruning, unset the service bit and perform the initial blockstore prune
14991499
// after any wallet rescanning has taken place.
15001500
if (fPruneMode) {
1501-
uiInterface.InitMessage(_("Pruning blockstore..."));
15021501
LogPrintf("Unsetting NODE_NETWORK on prune mode\n");
15031502
nLocalServices &= ~NODE_NETWORK;
15041503
if (!fReindex) {
1504+
uiInterface.InitMessage(_("Pruning blockstore..."));
15051505
PruneAndFlush();
15061506
}
15071507
}

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
18811881
std::set<int> setFilesToPrune;
18821882
bool fFlushForPrune = false;
18831883
try {
1884-
if (fPruneMode && fCheckForPruning) {
1884+
if (fPruneMode && fCheckForPruning && !fReindex) {
18851885
FindFilesToPrune(setFilesToPrune);
18861886
fCheckForPruning = false;
18871887
if (!setFilesToPrune.empty()) {

0 commit comments

Comments
 (0)