Browse Source

Do not allow blockfile pruning during reindex.

Also clarify startup message.

Github-Pull: #6856
Rebased-From: d3b09f6bac738958b6bf5711bcb5291049b7466d
pull/145/head
Alex Morcos 9 years ago
committed by Wladimir J. van der Laan
parent
commit
dfe55bdc32
No known key found for this signature in database GPG Key ID: 74810B012346C9A6
  1. 2
      src/init.cpp
  2. 2
      src/main.cpp

2
src/init.cpp

@ -1369,10 +1369,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();
}
}

2
src/main.cpp

@ -2000,7 +2000,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
std::set<int> setFilesToPrune;
bool fFlushForPrune = false;
try {
if (fPruneMode && fCheckForPruning) {
if (fPruneMode && fCheckForPruning && !fReindex) {
FindFilesToPrune(setFilesToPrune);
fCheckForPruning = false;
if (!setFilesToPrune.empty()) {

Loading…
Cancel
Save