mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Merge pull request #6856
d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
This commit is contained in:
commit
c719cefc41
@ -1505,10 +1505,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();
|
||||
}
|
||||
}
|
||||
|
@ -1899,7 +1899,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…
x
Reference in New Issue
Block a user