Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711248
D17962.id53601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D17962.id53601.diff
View Options
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
Details
Attached
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)
Attached To
D17962: init: avoid unsetting service bits from `nLocalServices`
Event Timeline
Log In to Comment