Do not allow blockfile pruning during reindex.
Also clarify startup message.
This commit is contained in:
parent
da7d57fb95
commit
d3b09f6bac
@ -1498,10 +1498,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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1881,7 +1881,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…
Reference in New Issue
Block a user