Skip to content

Commit c719cef

Browse files
committed
Merge pull request #6856
d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
2 parents 2a1090d + d3b09f6 commit c719cef

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
@@ -1505,10 +1505,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
15051505
// if pruning, unset the service bit and perform the initial blockstore prune
15061506
// after any wallet rescanning has taken place.
15071507
if (fPruneMode) {
1508-
uiInterface.InitMessage(_("Pruning blockstore..."));
15091508
LogPrintf("Unsetting NODE_NETWORK on prune mode\n");
15101509
nLocalServices &= ~NODE_NETWORK;
15111510
if (!fReindex) {
1511+
uiInterface.InitMessage(_("Pruning blockstore..."));
15121512
PruneAndFlush();
15131513
}
15141514
}

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
18991899
std::set<int> setFilesToPrune;
19001900
bool fFlushForPrune = false;
19011901
try {
1902-
if (fPruneMode && fCheckForPruning) {
1902+
if (fPruneMode && fCheckForPruning && !fReindex) {
19031903
FindFilesToPrune(setFilesToPrune);
19041904
fCheckForPruning = false;
19051905
if (!setFilesToPrune.empty()) {

0 commit comments

Comments
 (0)