Browse Source

Merge pull request #6856

d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
c719cefc41
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

@ -1505,10 +1505,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// if pruning, unset the service bit and perform the initial blockstore prune // if pruning, unset the service bit and perform the initial blockstore prune
// after any wallet rescanning has taken place. // after any wallet rescanning has taken place.
if (fPruneMode) { if (fPruneMode) {
uiInterface.InitMessage(_("Pruning blockstore..."));
LogPrintf("Unsetting NODE_NETWORK on prune mode\n"); LogPrintf("Unsetting NODE_NETWORK on prune mode\n");
nLocalServices &= ~NODE_NETWORK; nLocalServices &= ~NODE_NETWORK;
if (!fReindex) { if (!fReindex) {
uiInterface.InitMessage(_("Pruning blockstore..."));
PruneAndFlush(); PruneAndFlush();
} }
} }

2
src/main.cpp

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

Loading…
Cancel
Save