Page MenuHomePhabricator

D17962.id53601.diff
No OneTemporary

D17962.id53601.diff

diff --git a/src/init.cpp b/src/init.cpp
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1712,7 +1712,7 @@
int nMaxConnections;
int nUserMaxConnections;
int nFD;
-ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED);
+ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK_LIMITED);
int64_t peer_connect_timeout;
std::set<BlockFilterType> g_enabled_filter_types;
@@ -2710,11 +2710,9 @@
// Step 10: data directory maintenance
- // if pruning, unset the service bit and perform the initial blockstore
- // prune after any wallet rescanning has taken place.
+ // if pruning, perform the initial blockstore prune
+ // after any wallet rescanning has taken place.
if (chainman.m_blockman.IsPruneMode()) {
- LogPrintf("Unsetting NODE_NETWORK on prune mode\n");
- nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK);
if (!fReindex) {
LOCK(cs_main);
for (Chainstate *chainstate : chainman.GetAll()) {
@@ -2722,6 +2720,9 @@
chainstate->PruneAndFlush();
}
}
+ } else {
+ LogPrintf("Setting NODE_NETWORK on non-prune mode\n");
+ nLocalServices = ServiceFlags(nLocalServices | NODE_NETWORK);
}
// Step 11: import blocks

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 11:10 (10 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5570703
Default Alt Text
D17962.id53601.diff (1 KB)

Event Timeline