mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge fa5c224d44 into merged_master (Bitcoin PR bitcoin/bitcoin#25887)
This commit is contained in:
commit
57c470f3b6
1 changed files with 5 additions and 4 deletions
|
|
@ -798,7 +798,7 @@ namespace { // Variables internal to initialization process only
|
|||
int nMaxConnections;
|
||||
int nUserMaxConnections;
|
||||
int nFD;
|
||||
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED | NODE_WITNESS);
|
||||
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS);
|
||||
int64_t peer_connect_timeout;
|
||||
std::set<BlockFilterType> g_enabled_filter_types;
|
||||
|
||||
|
|
@ -1658,11 +1658,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
|
||||
// ********************************************************* Step 10: data directory maintenance
|
||||
|
||||
// if pruning, unset the service bit and perform the initial blockstore prune
|
||||
// if pruning, perform the initial blockstore prune
|
||||
// after any wallet rescanning has taken place.
|
||||
if (fPruneMode) {
|
||||
LogPrintf("Unsetting NODE_NETWORK on prune mode\n");
|
||||
nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK);
|
||||
if (!fReindex) {
|
||||
LOCK(cs_main);
|
||||
for (CChainState* chainstate : chainman.GetAll()) {
|
||||
|
|
@ -1670,6 +1668,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
chainstate->PruneAndFlush();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LogPrintf("Setting NODE_NETWORK on non-prune mode\n");
|
||||
nLocalServices = ServiceFlags(nLocalServices | NODE_NETWORK);
|
||||
}
|
||||
|
||||
// ********************************************************* Step 11: import blocks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue